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
I have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
When an incremental load with copy_partitions=True, and partitions=[... list of partitions ...] is used, the macro bq_static_insert_overwrite_sql does not produce any SQL statements, which leads the BigQuery client to trigger an error.
On top of that, because this code:
-- 2. clean up the temp tabledroptable if exists {{ tmp_relation }};
is only executed when copy_partitions=False, the temp table is not deleted.
Expected Behavior
A non-empty statement should be produced by the macro and sent to dbt. I figure that drop table if exists {{tmp_relation}}; should just be taken out of any conditional blocks and just always be there.
14:48:05 Completed with 1 error and 0 warnings:
14:48:05
14:48:05 Database Error in model the_model (models/the_model.sql)
Syntax error: Unexpected end of statement at [1:331]
compiled Code at /Users/alex/the_project/target/run/the_project/models/the_model.sql
It wasn't supported but I wrote #1351 to do so.
As a workaround, you might just use the updated macros and use them as a macro override to check in your own dbt project.
Is this a new bug in dbt-bigquery?
Current Behavior
When an incremental load with
copy_partitions=True
, andpartitions=[... list of partitions ...]
is used, the macrobq_static_insert_overwrite_sql
does not produce any SQL statements, which leads the BigQuery client to trigger an error.On top of that, because this code:
is only executed when
copy_partitions=False
, the temp table is not deleted.Expected Behavior
A non-empty statement should be produced by the macro and sent to dbt. I figure that
drop table if exists {{tmp_relation}};
should just be taken out of any conditional blocks and just always be there.Steps To Reproduce
Relevant log output
14:48:05 Completed with 1 error and 0 warnings: 14:48:05 14:48:05 Database Error in model the_model (models/the_model.sql) Syntax error: Unexpected end of statement at [1:331] compiled Code at /Users/alex/the_project/target/run/the_project/models/the_model.sql
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: