You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross-db incremental loads aren't qualified correctly in Snowflake
Issue description
On Snowflake, when you override the target database of a model in dbt_project.yml like this:
# in dbt_project.yml
extra:
database: ldw
schema: extra
A --full-refresh works great for making the initial table into the desired database even when that database is a different one than the one of the target profile.
However, it errors out when doing an incremental load.
Results
This is the stack trace of the error
2019-05-09 16:28:41,774 (Thread-1): On xspend: BEGIN
2019-05-09 16:28:41,940 (Thread-1): SQL status: SUCCESS 1 in 0.17 seconds
2019-05-09 16:28:41,940 (Thread-1): Using snowflake connection "xspend".
2019-05-09 16:28:41,940 (Thread-1): On xspend: use schema extra;
2019-05-09 16:28:42,283 (Thread-1): Snowflake error: 002043 (02000): 018c1420-0274-2253-0000-5a0100302056: SQL compilation error:
Object does not exist, or operation cannot be performed.
2019-05-09 16:28:42,283 (Thread-1): On xspend: ROLLBACK
Notice the use schema extra; command. It should have been a fully qualified use schema ldw.extra;
System information
dbt 0.13.0
macOS
python 3.6.7
Steps to reproduce
target profile database = abc
dbt_project.yml, set a model's database to be def
run the model as an incremental load
dbt errors out due to non-fully qualified object
The text was updated successfully, but these errors were encountered:
Thanks @joshpeng! I am pretty sure the bug you encountered will be fixed in 0.14.0, as we'll be using a merge statement for incremental models instead of a temp table + delete + insert. The point remains that the create_table macro implementation on Snowflake isn't database-aware, and we should fix that too :)
Issue
Cross-db incremental loads aren't qualified correctly in Snowflake
Issue description
On Snowflake, when you override the target database of a model in
dbt_project.yml
like this:A
--full-refresh
works great for making the initial table into the desired database even when that database is a different one than the one of the target profile.However, it errors out when doing an incremental load.
Results
This is the stack trace of the error
Notice the
use schema extra;
command. It should have been a fully qualifieduse schema ldw.extra;
System information
dbt 0.13.0
macOS
python 3.6.7
Steps to reproduce
abc
dbt_project.yml
, set a model's database to bedef
The text was updated successfully, but these errors were encountered: