-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADAP-674] [Bug] dbt_tmp is created twice with copy_partitions:true #810
Comments
Related Slack thread: https://getdbt.slack.com/archives/C99SNSRTK/p1688687595877169 |
I found that the macro Steps to reproduceModel: incremental_test.sql {{ config(
materialized="incremental",
incremental_strategy="insert_overwrite",
partition_by={
"field": "_partition",
"granularity": "day",
"data_type": "timestamp",
"time_ingestion_partitioning": True,
"copy_partitions": True,
},
on_schema_change='append_new_columns'
) }}
SELECT
timestamp_trunc(CURRENT_TIMESTAMP(), day) as _partition,
'some value' as col1 Relevant outputFrom the second execution onwards, the query will execute twice in every
|
@damiaomartins, I managed reproduced the issue with your latest example and fix the issue locally (your pointers were helpful 👍 ). I opened a PR. |
FYI till this is released, just copy following macro as a macro in your dbt project to override the bugged one:
|
Is this a new bug in dbt-bigquery?
Current Behavior
when using copy_partitions: true in partition_by parameter, it is creating dbt_tmp table twice before performing copy step
Expected Behavior
it should only run dbt_tmp once
Steps To Reproduce
model: test
first run:
dbt run --select test
second run:
dbt run --select test
is executed twice
Relevant log output
No response
Environment
Additional Context
No response
The text was updated successfully, but these errors were encountered: