dbt · Incremental Models & Performance

Incremental model flow

Mediumincrementalperformancematerialization

Interview question

Explain how an incremental dbt model works end-to-end.

How to answer

The short answer

An materializes as a table that is fully built on the first run, then on later runs processes only new or changed rows instead of rebuilding everything.

Flow

Minimal pattern

SQL
{{ config(
    materialized='incremental',
    unique_key='order_id'
) }}

select
    order_id,
    customer_id,
    amount,
    updated_at
from {{ ref('stg_orders') }}

{% if is_incremental() %}
where updated_at > (
    select coalesce(max(updated_at), '1900-01-01') from {{ this }}
)
{% endif %}

What dbt does conceptually

  1. 1Compile SQL (with or without the incremental filter).
  2. 2If table missing / full refresh → build full table.
  3. 3Else apply the configured incremental strategy (merge, append, etc.) using the filtered query as the "new batch."

When to use

Large facts that grow daily; full table rebuilds become too slow or expensive.

Interview tip: Always state the grain, the watermark column, and the strategy. Incremental without a clear change key or watermark is a common production footgun.