dbt snapshots are a core part of dbt for managing historical changes. With just a few lines of configuration in your snapshots directory, you get SCD Type 2 “out of the box”: each change to a tracked record preserves an older version. This makes dbt snapshots ideal for audit-ready tables or any use case requiring change data capture with full history—especially fast for analytics engineers new to SCD patterns.
Unlike manual approaches, dbt snapshots rely on automated change detection algorithms and can easily be enabled across multiple tables, letting teams achieve consistency and compliance with minimal custom SQL.
Want a full blueprint for organizing large dbt projects? See our dbt Project Structure Conventions for practical tips and best practices.
How Snapshots Work: timestamp vs. check Strategies
For capturing changes, dbt snapshots offer two strategies:
- Timestamp Strategy: Uses an updated_at field. If this timestamp gets updated (ideally only for meaningful changes), dbt marks the row as changed. Rely on this only when upstream systems never update the timestamp for non-material changes (e.g., no-op updates).
- Check Strategy: Compares a set of column values between the current version and the last historical version. This ensures all material changes are captured, even if timestamps are unreliable—a safeguard many analytics teams prefer for highly-regulated or business-critical pipelines.
The choice is significant: the timestamp strategy may miss changes when timestamps aren’t dependable, while check can increase compute costs by scanning more data, especially for very wide or high-frequency tables. Both are supported officially (dbt docs). For a walkthrough, see phData’s guide.
Pros: When to Use Snapshots for Speed, Simplicity, and Compliance
dbt snapshots shine in certain scenarios:
- Simplicity: Designed for fast adoption with minimal configuration; no custom SQL.
- Audit-Readiness: Change tracking at the row level (SCD Type 2), essential for legal compliance like SOX or FINRA.
- Team Consistency: A declarative standard, easy for teams to enforce across models.
- Rapid Prototyping: Spin up full historical tables in development or staging within hours.
dbt snapshots are especially suited to use cases with moderate data size, a need for every change captured, or early-stage analytics teams.
Cons: The Downsides of Potential Costs and Lack of Flexibility
But snapshots have real trade-offs:
- Scalability: On high-churn, large tables (with millions of active rows), warehouse storage use can increase sharply. Third-party research and GCP benchmarks confirm this impact on BigQuery and Snowflake.
- Limited Customization: Only SCD Type 2 supported directly. Specific business rules (e.g., SCD Type 3 or attribute-specific retention) require complex workarounds.
- Data Bloat: By default, snapshots keep all history unless additional purging logic is implemented.
- Debugging Complexity: Diagnosing snapshot logic can be harder than reasoning through custom SQL.
If controlling storage cost or implementing nuanced compliance rules is required, teams often reach for custom SCD logic.