[Bug] Using --empty
Flag with dynamic_table
Materialization Results in Snowflake Error
#1205
Open
2 tasks done
Labels
Is this a new bug in dbt-snowflake?
Current Behavior
When attempting to execute dbt with the
run
/build
commands with the--empty
flag, the following error is received from Snowflake:Impact: This is preventing us from fully testing projects in our CI pipeline
Expected Behavior
When attempting to execute dbt with the
run
/build
commands with the--empty
flag, the dynamic table builds successfully containing 0 records without Snowflake throwing an error.Steps To Reproduce
Leveraging the
jaffle_shop
dbt project...Create a dbt profile of type
snowflake
Create a Snowflake Dynamic table model.
Name:
customers__dynamic_table__example__error_on_empty.sql
Body:
Attempt to run the model and receive the following output:
Relevant log output
Environment
Additional Context
The issue appears to be related to the syntax
where false
.SQL Causing Failure
Message:
SQL compilation error: Dynamic Tables must have at least one base table.
SQL Executing Successfully (
where false
->where true=false
)Message:
Dynamic table CUSTOMERS__DYNAMIC_TABLE__EXAMPLE__ERROR_ON_EMPTY successfully created.
The text was updated successfully, but these errors were encountered: