The short version
A dbt incremental model keeps the latest state of each row: when a customer changes plan, the old value is overwritten and gone. A dbt snapshot keeps history: every change closes the old row by setting dbt_valid_to and adds a new row with a fresh dbt_valid_from, which is the type-2 slowly changing dimension the snapshot docs describe. Neither notices a hard delete by default; a snapshot can, with hard_deletes: invalidate or new_record. Use incremental for "what is true now", a snapshot for "what was true on date X", and remember a snapshot only records what it sees when it runs.
I ran both, side by side, on dbt-core 1.11.7 with dbt-postgres 1.10.0 against PostgreSQL 16.14.
One source, one incremental model, four snapshots
The source is a raw_customers table that the application updates in place: customer_id, name, plan, updated_at. The incremental model is the standard pattern from dbt incremental models, shown with real runs:
-- models/customers_latest.sql
{{ config(materialized='incremental', unique_key='customer_id') }}
select customer_id, name, plan, updated_at
from {{ source('crm', 'raw_customers') }}
{% if is_incremental() %}
where updated_at > (select max(updated_at) from {{ this }})
{% endif %}
The snapshots use the YAML format. Configuring snapshots in a YAML file arrived in dbt 1.9; the {% snapshot %} block inside a .sql file is now documented as the legacy configuration for 1.8 and earlier. Four snapshots of the same source, two strategies, three ways of handling deletes:
# snapshots/customers.yml
snapshots:
- name: customers_ts
relation: source('crm', 'raw_customers')
config:
unique_key: customer_id
strategy: timestamp
updated_at: updated_at
- name: customers_ts_invalidate # same, plus hard_deletes: invalidate
- name: customers_ts_new_record # same, plus hard_deletes: new_record
- name: customers_check
relation: source('crm', 'raw_customers')
config:
unique_key: customer_id
strategy: check
check_cols: [plan]
(The middle two are written out in full in the real file.) Each "day" below is one change to the source followed by dbt run and dbt snapshot. The updated_at values are dated 19 to 24 October, but all six days ran within about 80 seconds on 25 October, UTC. That matters later, and it is the reason some timestamps below say 2026-10-25.
Day 1 and 2: a change, a new row, and an update nobody timestamped
Day 1 loaded four customers, all with updated_at 2026-10-19 09:00. On day 2, Ann moved from basic to pro with a new updated_at, Eve signed up, and Bob was moved from pro to basic by a statement that did not touch updated_at.
The incremental model reported INSERT 0 2. Its table after day 2:
customer_id | name | plan | updated_at
1 | Ann | pro | 2026-10-20 08:00:00
2 | Bob | pro | 2026-10-19 09:00:00
3 | Cid | basic | 2026-10-19 09:00:00
4 | Dee | pro | 2026-10-19 09:00:00
5 | Eve | basic | 2026-10-20 10:00:00
Ann's basic plan is gone. Bob still says pro, which is wrong. The timestamp snapshot:
customer_id | plan | updated_at | dbt_valid_from | dbt_valid_to
1 | basic | 2026-10-19 09:00:00 | 2026-10-19 09:00:00 | 2026-10-20 08:00:00
1 | pro | 2026-10-20 08:00:00 | 2026-10-20 08:00:00 |
2 | pro | 2026-10-19 09:00:00 | 2026-10-19 09:00:00 |
3 | basic | 2026-10-19 09:00:00 | 2026-10-19 09:00:00 |
...
Ann now has two rows, the old one closed at the moment of the change. Bob still says pro here too: the timestamp strategy, like the incremental filter, only sees rows whose updated_at moved. The check snapshot caught him:
customer_id | plan | updated_at | dbt_valid_from | dbt_valid_to
1 | basic | 2026-10-19 09:00:00 | 2026-10-25 23:08:11.756014 | 2026-10-25 23:08:20.739187
1 | pro | 2026-10-20 08:00:00 | 2026-10-25 23:08:20.739187 |
2 | pro | 2026-10-19 09:00:00 | 2026-10-25 23:08:11.756014 | 2026-10-25 23:08:20.739187
2 | basic | 2026-10-19 09:00:00 | 2026-10-25 23:08:20.739187 |
...
It compares the columns in check_cols with the current snapshot row, so a silent update is still a change. The price is in the dates: with no updated_at configured, the check snapshot stamps dbt_valid_from and dbt_valid_to with the time the snapshot ran. Ann's switch is dated when dbt noticed it, not when it happened. The snapshot docs recommend the timestamp strategy and keep check for tables without a reliable updated_at; Bob is what an unreliable updated_at looks like.
What SQL does dbt snapshot run?
dbt builds a staging table of changes, then applies it. From logs/dbt.log, the temporary table for customers_ts_invalidate (trimmed):
create temporary table "customers_ts_invalidate__dbt_tmp190825472996" as (
with snapshot_query as (
select * from "postgres"."dbt_incremental_vs_snapshot"."raw_customers"
),
...
updates as (
select 'update' as dbt_change_type, source_data.*, snapshotted_data.dbt_scd_id
from updates_source_data as source_data
join snapshotted_data
on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key
where ((snapshotted_data.dbt_valid_from < source_data.updated_at))
),
deletes as (
select 'delete' as dbt_change_type, source_data.*,
now()::timestamp without time zone as dbt_valid_from,
now()::timestamp without time zone as dbt_updated_at,
now()::timestamp without time zone as dbt_valid_to,
snapshotted_data.dbt_scd_id
from snapshotted_data
left join deletes_source_data as source_data
on snapshotted_data.dbt_unique_key = source_data.dbt_unique_key
where source_data.dbt_unique_key is null
)
select * from insertions union all select * from updates union all select * from deletes
);
Two things to read from it. The snapshot selects the whole source every run (select * with no filter), where the incremental model reads only rows past its high-water mark. And deletes are dated with now(). Then target/run/ holds the statements that changed the table:
update "postgres"."dbt_incremental_vs_snapshot"."customers_ts_invalidate"
set dbt_valid_to = DBT_INTERNAL_SOURCE.dbt_valid_to
from "customers_ts_invalidate__dbt_tmp190838422316" as DBT_INTERNAL_SOURCE
where DBT_INTERNAL_SOURCE.dbt_scd_id::text = "postgres"."dbt_incremental_vs_snapshot"."customers_ts_invalidate".dbt_scd_id::text
and DBT_INTERNAL_SOURCE.dbt_change_type::text in ('update'::text, 'delete'::text)
and "postgres"."dbt_incremental_vs_snapshot"."customers_ts_invalidate".dbt_valid_to is null;
insert into "postgres"."dbt_incremental_vs_snapshot"."customers_ts_invalidate" (...)
select DBT_INTERNAL_SOURCE."customer_id", ...
from "customers_ts_invalidate__dbt_tmp190838422316" as DBT_INTERNAL_SOURCE
where DBT_INTERNAL_SOURCE.dbt_change_type::text = 'insert'::text;
An update and an insert: old rows are closed, never deleted or overwritten.
Day 3: a hard delete, with and without hard_deletes
Cid was deleted from the source. The hard_deletes page for dbt 1.9 and later lists three settings: ignore (the default), invalidate, which replaces the older invalidate_hard_deletes=true, and new_record. The old flag still works for existing snapshots, but not in the same config as hard_deletes. The run:
...
23:08:25 3 of 4 OK snapshotted dbt_incremental_vs_snapshot.customers_ts_invalidate ...... [INSERT 0 0 in 0.06s]
23:08:25 4 of 4 OK snapshotted dbt_incremental_vs_snapshot.customers_ts_new_record ...... [INSERT 0 1 in 0.09s]
Cid in each table afterwards:
| Table | Cid's rows |
|---|---|
customers_latest (incremental) |
3 / Cid / basic, unchanged |
customers_ts (ignore) |
basic, dbt_valid_to empty, still current |
customers_check (ignore) |
basic, still current |
customers_ts_invalidate |
basic, dbt_valid_to 2026-10-25 23:08:25.408675 |
customers_ts_new_record |
old row closed at 23:08:25.468703, plus a new row from 23:08:25.468703 with dbt_is_deleted True |
The incremental model and the two default snapshots all still say Cid is a customer. Note the log line for invalidate: "INSERT 0 0". Closing a row is the update statement, and the count dbt printed is the insert's.
Day 4: Ann changes back
Ann went from pro back to basic. The incremental model shows basic with the new date, the same thing it would show if she had never left basic. All three timestamp snapshots kept every step:
customer_id | plan | dbt_valid_from | dbt_valid_to
1 | basic | 2026-10-19 09:00:00 | 2026-10-20 08:00:00
1 | pro | 2026-10-20 08:00:00 | 2026-10-22 08:00:00
1 | basic | 2026-10-22 08:00:00 |
A change back is a change, for both strategies, because each compares with the current snapshot row, not with any earlier one.
Day 5: the deleted customer returns
Cid came back with plan pro and updated_at 2026-10-23 09:00. Here my backdated test dates collided with dbt's clock, and the result is worth seeing. customers_ts_new_record:
customer_id | plan | dbt_valid_from | dbt_valid_to | dbt_is_deleted
3 | basic | 2026-10-19 09:00:00 | 2026-10-25 23:08:25.468703 | False
3 | pro | 2026-10-23 09:00:00 | | False
3 | basic | 2026-10-25 23:08:25.468703 | 2026-10-23 09:00:00 | True
The deletion row is valid from 25 October to 23 October, ending before it starts. The delete was stamped with now(), the return with the source's updated_at, and nothing checks that they agree. customers_ts_invalidate now has two open versions of Cid for any time between 23 and 25 October. In production the same thing happens whenever updated_at runs behind the database clock, for example an application writing New York local time into a timestamp column while Postgres runs in UTC, as mine did. Keep the source timestamps and the warehouse on one clock.
Day 6: two changes between runs
Dee went pro to basic at 08:00 and back to pro at 09:00, both before the next run. The timestamp snapshots added a row, pro to pro, because updated_at moved. The check snapshot inserted nothing:
23:09:27 1 of 4 OK snapshotted dbt_incremental_vs_snapshot.customers_check .............. [INSERT 0 0 in 0.28s]
23:09:27 2 of 4 OK snapshotted dbt_incremental_vs_snapshot.customers_ts ................. [INSERT 0 1 in 0.07s]
Neither has the hour Dee spent on basic. dbt's incremental-or-snapshot guide says it plainly: snapshots capture the values available when they run and cannot recover changes overwritten in between. A daily snapshot is a daily sample.
Querying a dbt snapshot as of a date
The point of the history is this query: every customer as they were at noon on 20 October.
select customer_id, name, plan, dbt_valid_from, dbt_valid_to
from dbt_incremental_vs_snapshot.customers_ts_invalidate
where dbt_valid_from <= timestamp '2026-10-20 12:00'
and (dbt_valid_to > timestamp '2026-10-20 12:00' or dbt_valid_to is null)
order by customer_id;
customer_id | name | plan | dbt_valid_from | dbt_valid_to
1 | Ann | pro | 2026-10-20 08:00:00 | 2026-10-22 08:00:00
2 | Bob | pro | 2026-10-19 09:00:00 |
3 | Cid | basic | 2026-10-19 09:00:00 | 2026-10-25 23:08:25.408675
4 | Dee | pro | 2026-10-19 09:00:00 | 2026-10-24 09:00:00
5 | Eve | basic | 2026-10-20 10:00:00 |
(5 rows)
Ann is pro, which no query against customers_latest can tell you any more. Bob is pro, which was false by then, because this is a timestamp snapshot. The or dbt_valid_to is null is needed because current rows have a null dbt_valid_to; dbt_valid_to_current, also new in 1.9, can put a far-future date there instead so a plain between works. The same query at noon on 24 October returned two rows for Cid, the day 5 overlap, so check count(*) per key when you first point it at a snapshot with deletes.
dbt incremental vs snapshot: which one to use
From what the runs showed:
- Incremental model when the question is "what is true now" and the source's
updated_atis trustworthy. It reads only new rows, it can be rebuilt with--full-refreshfrom the source at any time, and it forgets. It does not see deletes either; the strategy choice for applying updates is in dbt incremental: merge vs delete+insert. - Snapshot, timestamp strategy, when you need "as of" queries and
updated_atis reliable. Valid dates come from the source, so they mean when the change happened. - Snapshot, check strategy, when
updated_atlies, like Bob's. You get change detection on the columns you list and dates that mean "when dbt saw it". hard_deletes: new_recordwhen a deletion is itself a fact you report on;invalidatewhen closing the row is enough. Leaving the default means deleted rows look current forever.
A snapshot cannot be rebuilt: the snapshot docs advise a separate schema for that reason, and if you drop the table the history it recorded is gone, because the source never had it. Snapshot the source or a light staging model, run it as often as the history you need, and build incremental models for current state on top. If the source already keeps its own change log with from and to dates, the dbt guide above notes you may not need a snapshot at all.