DBT Snapshot creating duplicate rows even though there's no change in source data

The problem I’m having

I have an incremental model with snowflake incremental strategy delete+insert . Now there’s no if incremental logic defined yet. So basically the table works as full refresh everytime. And everytime a new row is inserted into the snapshot . This creates duplicate rows in snapshot .
Snapshot logic has check all columns. So logically it should not create duplicate rows because column vlues are not at all changing. But still dbt generates different dbt_scd_id each time for the same row whenever it fully refreshes.

1 Like

I also have this issue - dbt is creating duplicates. I have some rows with the same dbt_SCD_ID and some without. I’m also using the check columns and the columns do not always change, yet dbt creates a new row which then gives me duplicate errors.

I recently addressed the same issue, if this issue gets resolved. could you please share the fix that works for you… Appreciate your response.

We have the same issue here.

Likewise. I thought NULLs were causing issues, but COALESCE doesn’t help.

I am also having this same issue. dbt_scd_id is the same on multiple records which causes the snapshot to fail.