What are dbt snapshots? dbt snapshots record how rows in a mutable table change over time, so you can answer questions about what a record looked like in the past. Many source tables simply overwrite old values, so an address, a plan or a status change erases history. A snapshot compares each run with the previous state and keeps a row for each version, with start and end timestamps, which is the pattern known as a type 2 slowly changing dimension. This guide explains how snapshots work, the timestamp and check strategies, how to configure and query them, how to use them in models and reports, how to handle deletes and the mistakes that lose history or create confusing duplicates. Details vary by version and adapter, so confirm in current dbt documentation.
Short answer: Use snapshots for source tables that overwrite data you need to keep. Pick a unique key and either an updated-at column or a column check, run snapshots on a schedule and build current and historical views on top.
Why history matters
Business questions often depend on the past: which plan was a customer on when they bought, who owned an account last quarter or what price applied on a given day. If the source only stores the latest value, that history is gone unless you capture it. Snapshots preserve it at the pace you run them. See data modeling and data warehouses.

How a snapshot records change
| Column | Meaning |
|---|---|
| Business key and attributes | Copied from the source row |
| dbt_valid_from | When this version became current |
| dbt_valid_to | When it was replaced, empty for the current version |
| dbt_scd_id | Unique identifier for each version |
| dbt_updated_at | The timestamp used to detect change |
Each change creates a new row and closes the previous one, so the full history of a record is a series of rows.
Snapshot strategies
| Strategy | How it detects change | Best for | Limitation |
|---|---|---|---|
| Timestamp | Compares an updated-at column | Sources with a reliable updated-at | Fails if the column is not maintained |
| Check | Compares chosen columns or all columns | Sources without a timestamp | Higher compute and may miss unlisted columns |
Prefer the timestamp strategy where possible. See sources and seeds for choosing reliable inputs.

Setting up a snapshot
- Pick the source. Choose a table that overwrites values you need to keep.
- Define the unique key. Identify the row, such as customer id.
- Choose the strategy. Timestamp where available, otherwise check columns.
- Set the target schema. Place snapshots in a protected, separate schema.
- Run on a schedule. Run often enough to catch changes you care about.
- Build views on top. Expose current and as-of views for analysts.
Using snapshot data
- Filter on a null valid-to date to get the current version of each record.
- Join facts to the version valid at the event time for point-in-time accuracy.
- Build dimension models from snapshots for history-aware reporting.
- Count changes to understand how often attributes move.
- Expose clean current and historical views, not raw snapshot tables.
- Document the run frequency so users know the resolution of history.
Operating snapshots safely
Snapshots hold history that cannot be recreated, so protect them. Place them in a separate schema with restricted write access, back them up and avoid dropping or fully refreshing them. Do not change the unique key or strategy casually, because that can corrupt the history. Plan changes carefully and test on a copy first.
- Separate, protected schema.
- Backups and restricted access.
- Careful, tested changes to configuration.
- Monitoring for unexpected row growth.
Snapshots compared with other history approaches
Snapshots are one of several ways to keep history. Change data capture records every change as it happens and gives complete detail, but needs source and platform support. Source-system audit tables keep history inside the application, but they are rarely modelled for analytics. Append-only event tables suit data that is naturally event-based.
Snapshots shine when you cannot change the source and only need history at the resolution of your schedule. Choose based on how precise the history must be, how large the table is and how much you control the source system.
- Use change data capture for complete, precise history.
- Use snapshots when you cannot change the source.
- Use event tables for naturally event-based data.
- Match the resolution to business needs.
Governance of historical data
History can contain personal data that people have asked to delete. Plan for privacy requests by recording where personal fields live in snapshots, defining a deletion or anonymisation process and keeping access limited to those with a need. Document retention periods, and remove history that is no longer required. See data governance.
- Record where personal data lives.
- Define deletion and anonymisation steps.
- Set retention periods.
Testing snapshots
Test that the key is unique within each valid period, that valid-from dates never overlap for the same key and that exactly one current row exists per key. These checks catch configuration mistakes early, before they damage history that cannot be rebuilt.
- Exactly one current row per key.
- No overlapping validity ranges.
- Valid-from before valid-to.
Common mistakes
- Snapshotting a table that already stores full history.
- Choosing an updated-at column that is not reliably maintained.
- Running snapshots too rarely and missing short-lived changes.
- Allowing full refresh or drops on snapshot tables.
- Not exposing a simple current view, so analysts use raw rows.
- Ignoring deleted source rows.
A worked example
A subscription business snapshotted its customer table, keyed on customer id with the updated-at timestamp, running every hour. A dimension model joined each order to the customer version valid at purchase time.
Revenue by plan became accurate even for customers who later changed plans, and support could see exactly when an account owner changed. The example is illustrative.
Best practices and support
- Snapshot only what you need.
- Run on a regular, documented schedule.
- Test keys and valid-from ordering.
- Expose simple views for users.
Our data warehousing service and data governance service design history-aware models and protect critical data.
Related guides
Read dbt models, incremental models, data governance and master data management for related topics.
Snapshot checklist
| Item | Done when |
|---|---|
| Key | Unique and tested |
| Strategy | Timestamp or check chosen deliberately |
| Schedule | Matches how fast data changes |
| Access | Protected schema |
| Views | Current and as-of views available |
| Deletes | Behaviour documented |
Handling deletes and hard changes
When a row disappears from the source, a snapshot can mark it as invalidated, keeping history while showing it is no longer current. Decide how your reports should treat deleted records and document it. For very large tables or when the source supports change data capture, a capture stream may be a better way to record history than snapshots alone. See change data capture.
- Enable invalidation for deleted rows.
- Document report treatment of deletes.
- Consider change data capture for large tables.
- Test with sample deletions.
Point-in-time joins in practice
To report facts as they were, join on the business key and require the event time to fall between the valid-from and valid-to values of the snapshot row. Treat an empty valid-to as the far future. Test these joins carefully with known examples, because mistakes produce duplicated or missing facts that are hard to spot.
Key takeaways
- Snapshots keep history of changing rows.
- Timestamp strategy is preferred.
- Run often enough to catch changes.
- Protect snapshot tables.
- Expose current and as-of views.
Quick glossary
| Term | Meaning |
|---|---|
| Snapshot | Recorded history of a changing table |
| SCD type 2 | New row for each change |
| Valid from and to | Version time range |
| Point-in-time join | Join using version valid at event time |
| Invalidation | Closing history for deleted rows |
Read next: BigQuery vs Snowflake: Which Cloud Data Platform? · BigQuery Streaming Inserts: Real-Time Ingestion Guide · BigQuery Access Control: IAM, Policy Tags and Row Security
Frequently asked questions
What is a dbt snapshot?
A table that records how rows in a source change over time, keeping a row per version.
What is a type 2 slowly changing dimension?
A design that keeps history by adding a new row each time an attribute changes.
Timestamp or check strategy?
Use timestamp when a reliable updated-at column exists, and check when it does not.
How do I get the current version of a record?
Filter on rows where the valid-to date is empty.
How often should I run snapshots?
Often enough to capture changes you need, as shorter-lived changes between runs are missed.
Can snapshots be rebuilt?
Not from the source, because history is lost, so protect and back them up.
How are deleted rows handled?
Snapshots can invalidate rows that vanish from the source, keeping their history.
Where should snapshots live?
In a separate, protected schema with restricted write access.
