SCD type 2 in using dbt

Hi, have a question on dbt scd type 2.

We have source tables and dimension tables. Have the snapshot which is reading source table and capturing any changes to snapshot tables. Now, how should we insert and specially update the existing rows in dimension tables using snapshot or SCD works differently in DBT?

When you run dbt snapshot, it will take responsibility for identifying any changes according to your snapshot strategy (timestamp or check columns). From there, it will coordinate the DML to add new records to the SCD-2 table and close out any which are no longer active. You don’t need to manually write any insert or update statements

Thanks. Understood and implemented. Working like a charm.

2 Likes