English · IndiaLog in
Rackwave Technologies
Request quote Free consultation
DataUpdated 26 Nov 2026

dbt Incremental Models: Strategies and Pitfalls

dbt incremental models: strategies, filters, late data and full refresh.

Written by Rohan Verma
  • Published25 Nov 2026
  • Read time6 min
  • Length1,249 words
Share this guide

What are dbt incremental models? dbt incremental models build a table in stages: the first run creates the full table, and later runs process only new or changed rows and add them to it. For large event and fact tables this cuts run time and warehouse cost dramatically compared with rebuilding everything on each run. Incremental logic adds complexity, because you must decide how to find new rows, how to handle updates and late data and how to recover when something goes wrong. This guide explains how incremental models work, the available strategies, how to write the filter safely, how to handle late-arriving and updated records, how to test and rebuild and the mistakes that cause duplicates or missing data. Details vary by version and adapter, so confirm in current dbt documentation.

Short answer: Use incremental models for large, append-heavy tables. Define a reliable unique key and a filter on a trustworthy timestamp, reprocess a short trailing window for late data, test for duplicates and keep a simple way to run a full refresh.

How incremental models work

On the first run, or with a full refresh, dbt builds the whole table. On later runs, the model runs only the select statement, filtered by a condition that finds new rows, and merges or inserts the result into the existing table. The condition usually compares a timestamp with the latest value already in the table. See dbt models and data warehouses.

dbt incremental models diagram
Figure 1. dbt incremental models: new rows, key, lookback and how they relate.

Incremental strategies

StrategyHow it worksBest forWatch out for
AppendInserts new rows onlyImmutable event logsDuplicates if rows are reprocessed
MergeUpdates matching keys and inserts new onesRecords that changeCost of matching on large tables
Delete and insertDeletes matching keys then insertsPlatforms without efficient mergeBrief inconsistency during the step
Insert overwrite by partitionReplaces whole partitionsPartitioned fact tablesNeeds correct partition filter

Availability varies by warehouse. Choose the strategy that matches how your data changes.

Writing the incremental filter

  1. Choose a reliable timestamp. Prefer a load or updated timestamp, not a business date that can be backdated.
  2. Wrap the filter. Apply it only when the model is running incrementally.
  3. Compare with the target. Select rows newer than the maximum already loaded.
  4. Add a lookback window. Reprocess a few days to capture late-arriving rows.
  5. Define the unique key. Use a key so merges replace rather than duplicate.
  6. Test the result. Check for duplicates and gaps after each run.
Incremental at a glance summary
Figure 2. Incremental at a glance: strategy, filter, key at a glance.

Handling late and updated data

SituationApproach
Late-arriving eventsReprocess a trailing window and merge on the key
Records updated upstreamUse an updated-at column and a merge strategy
Deleted source recordsUse soft-delete flags or periodic full refresh
Schema changesSet how new columns are handled and refresh when needed
BackfillsRun a full refresh or targeted partition rebuild

Write the chosen rule in the model description so everyone understands why numbers may change slightly on rerun.

When not to use incremental models

  • Small tables that rebuild in seconds.
  • Models whose logic depends on all history, such as ranks across the whole table.
  • Data with no reliable timestamp or key.
  • Early prototypes where simplicity matters more than cost.
  • Models that change definition often and need full rebuilds anyway.
  • Sources that are rewritten in place without update markers.

Testing and operating incremental models

Test uniqueness on the key and compare row counts with the source after each run. Schedule an occasional full refresh in a low-traffic window to correct drift, and keep the command documented so any engineer can run it. Monitor run time and bytes processed to confirm that incremental builds are really cheaper than full builds. See dbt tests.

  • Unique key test on every incremental model.
  • Row count reconciliation with the source.
  • Scheduled full refresh for safety.
  • Alerts on run-time and cost spikes.

Performance tuning and cost control

The value of an incremental model is lower cost, so measure it. Record bytes scanned and run time for the full build and the incremental run, and track them over time. If incremental runs grow steadily slower, the cause is often a merge on a very large table or a filter that no longer prunes partitions.

Tune by limiting the merge to recent partitions, choosing clustering keys that match the match columns and avoiding wide selects. Where the platform supports it, consider an insert-overwrite strategy for partitioned facts, which can be cheaper than a row-level merge.

  • Track bytes scanned and run time.
  • Limit merges to recent partitions.
  • Cluster on merge keys.
  • Select only the columns you need.

Schema changes and on-schema-change behaviour

When a model gains or loses a column, an existing incremental table may no longer match the select. dbt lets you choose how to react: ignore the change, fail the run, append new columns or synchronise all columns. Failing is the safest default for critical tables, because it forces a deliberate decision and a planned refresh rather than silent drift.

Common mistakes

  • Filtering on a business date that can be backdated.
  • No unique key, so merges create duplicates.
  • No lookback window, losing late rows.
  • Never running a full refresh, so errors persist.
  • Changing logic without rebuilding history.
  • Assuming incremental is always cheaper.

A worked example

A team had a billion-row events table that took hours to rebuild. They switched it to an incremental model keyed on event id, filtered by load timestamp with a three-day lookback and used a merge strategy. A weekly full refresh ran on Sunday night.

Daily runs fell from hours to minutes, late events were captured and a uniqueness test caught one duplicate bug in the first week. The example is illustrative.

Best practices and support

  • Document the strategy and lookback in the model description.
  • Partition large tables by date.
  • Track cost before and after the change.
  • Keep a tested full refresh procedure.

Our data warehousing service and data analytics service tune incremental models for cost and reliability.

Read snapshots, sources and seeds, change data capture and BigQuery partitioning for related topics.

Incremental checklist

ItemDone when
KeyUnique and tested
FilterBased on a reliable timestamp
LookbackCovers normal late arrivals
StrategyMatches how data changes
RefreshFull refresh procedure documented
CostSavings measured

Partitioning and clustering together with incremental builds

Incremental models perform best when the target table is partitioned by the same date used in the filter, so the warehouse scans only recent partitions. Add clustering on common filter columns for faster reads. Check the query plan or bytes processed after each change, since a filter that does not prune partitions can erase the savings.

  • Partition by the incremental date.
  • Cluster on frequent filters.
  • Confirm partition pruning in query plans.
  • Re-measure after changes.

Migrating a table from full to incremental

Convert gradually. Build the incremental version alongside the old table, compare outputs over several runs, fix differences and then switch consumers. Keep the old table briefly for rollback. This approach reveals hidden assumptions, such as backdated records, before they affect reports.

Key takeaways

  • Incremental models process only new rows.
  • Choose a strategy that fits the data.
  • Use a reliable key and timestamp.
  • Reprocess a lookback window.
  • Keep a full refresh option.

Quick glossary

TermMeaning
Incremental modelModel that adds only new rows
MergeUpdate or insert by key
Lookback windowRecent period reprocessed each run
Full refreshRebuild from scratch
PartitionTable segment used to limit scans

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 an incremental model?

A dbt model that adds only new or changed rows on each run instead of rebuilding the whole table.

When should I use incremental models?

For large, mostly append-only tables where full rebuilds are slow or expensive.

What is a unique key in an incremental model?

A column or set of columns that identifies a row, so merges update rather than duplicate.

How do I handle late-arriving data?

Reprocess a trailing window of recent days and merge on the key.

How do I rebuild an incremental model?

Run it with the full refresh option to recreate the table from scratch.

Which strategy should I choose?

Append for immutable logs, merge for changing records and partition overwrite for partitioned facts.

Are incremental models always cheaper?

No. For small tables or heavy matching, a full rebuild can be simpler and just as fast.

How do I test them?

Test the key for uniqueness, reconcile row counts and run an occasional full refresh.

Was this guide helpful?Your answer helps us decide what to improve. It is not linked to you.

#dbt incremental models#dbt incremental strategy#dbt merge strategy#dbt incremental filter#dbt full refresh

About the author

Rohan Verma

Data Platforms Consultant

Rohan works across CDP, data warehouse, and analytics platform implementations, helping clients figure out which data infrastructure actually fits their scale rather than defaulting to whatever's currently trending.

Data Platforms & Technical Architecture

Ready to put AI and data to work?

Book a free consultation and leave with a plan, not a pitch.

Get a free consultationRequest quote