How to Use dbt Snapshots

Last updated July 25, 2026 · By the SaturnSQL team

Snapshots capture slowly changing dimensions (SCD type 2): each dbt snapshot run records row changes with dbt_valid_from and dbt_valid_to columns. Use strategy='timestamp' with an updated_at column, or strategy='check' to compare a list of columns.

Timestamp strategy

-- snapshots/customers_snapshot.sql
{% snapshot customers_snapshot %}
{{
  config(
    target_schema='snapshots',
    unique_key='id',
    strategy='timestamp',
    updated_at='updated_at'
  )
}}
SELECT * FROM {{ source('shop', 'customers') }}
{% endsnapshot %}

Check strategy

When the source has no reliable updated_at column, compare column values instead.

strategy='check',
check_cols=['status', 'plan', 'email']
dbt snapshot

Run this in SaturnSQL

SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.

Try it free

Related dbt guides

© 2026 Panda Capital Oy Ab. All rights reserved.