DBT Snapshots & Incremental Models Flashcards
6 cards from real DBT practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 DBT Snapshots & Incremental Models flashcards as text
What is the primary purpose of a dbt snapshot?
Answer: To capture and track slowly changing dimension (SCD) history in a source table
dbt snapshots implement Type 2 SCD logic, appending new rows when source data changes so you can query historical states.
Which directory stores dbt snapshot files by default?
Answer: snapshots/
Snapshot `.sql` files are placed in the top-level `snapshots/` directory of a dbt project.
What command runs all dbt snapshots?
Answer: dbt snapshot
`dbt snapshot` executes all snapshot files, applying the configured strategy to detect and record changes.
Which snapshot strategy compares a hash of all specified columns to detect row changes?
Answer: check
The `check` strategy hashes the values of listed columns and records a new snapshot row when the hash changes, useful when no reliable updated_at column exists.
Which snapshot strategy relies on an `updated_at` timestamp column to detect changes?
Answer: timestamp
The `timestamp` strategy compares the `updated_at` value between runs and creates new snapshot rows for records with a newer timestamp.
What column does dbt automatically add to a snapshot table to mark the time a record became current?
Answer: dbt_valid_from
`dbt_valid_from` is automatically populated with the timestamp when a snapshot row became the current version of the record.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy