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.

Hello. Did anyone find solution for the same? We have append and load table in source. we are picking the latest updated version of record on unique key and passing them to snapshot. If there is any update dbt is working as expected but in case of unchanged records dbt is end dating those records and creating a new version for the same records with new updated date. We want to maintain the old record itself as there is no update so no reason for it to be end dated. It would be much appreciated if anyone can help with this.