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
We use dbt's snapshot functionality with the check strategy to create snapshots from some source tables to track changes. The reason for the check strategy is that we only need to track one column out of many, and won't want a new row each time other non-tracked columns are updated.
When an existing row with the check column is updated from null to any non-null value, two rows identical rows are inserted instead of just one. These two rows have the same values in snapshot metadata fields as well (dbt_scd_id, dbt_updated_at, etc.)
Expected Behavior
Snapshot should only insert one row on source change.
run dbt snapshot when with row that has null for maximum_spend_amount column.
update same row's maximum_spend_amount with a non-null value, run dbt snapshot
the same row is created twice in the snapshot.
We just ran into this issue as well. We've been running our snapshots successfully for a long time in 1.7.11 and this started happening a couple days after upgrading to 1.9.2.
Is this a new bug in dbt-core?
Current Behavior
We use dbt's snapshot functionality with the
check
strategy to create snapshots from some source tables to track changes. The reason for the check strategy is that we only need to track one column out of many, and won't want a new row each time other non-tracked columns are updated.When an existing row with the check column is updated from
null
to any non-null value, two rows identical rows are inserted instead of just one. These two rows have the same values in snapshot metadata fields as well (dbt_scd_id
,dbt_updated_at
, etc.)Expected Behavior
Snapshot should only insert one row on source change.
Steps To Reproduce
with a snapshot model config like:
run
dbt snapshot
when with row that hasnull
formaximum_spend_amount
column.update same row's
maximum_spend_amount
with a non-null value, rundbt snapshot
the same row is created twice in the snapshot.
Relevant log output
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: