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.

Incremental strategies
| Strategy | How it works | Best for | Watch out for |
|---|---|---|---|
| Append | Inserts new rows only | Immutable event logs | Duplicates if rows are reprocessed |
| Merge | Updates matching keys and inserts new ones | Records that change | Cost of matching on large tables |
| Delete and insert | Deletes matching keys then inserts | Platforms without efficient merge | Brief inconsistency during the step |
| Insert overwrite by partition | Replaces whole partitions | Partitioned fact tables | Needs correct partition filter |
Availability varies by warehouse. Choose the strategy that matches how your data changes.
Writing the incremental filter
- Choose a reliable timestamp. Prefer a load or updated timestamp, not a business date that can be backdated.
- Wrap the filter. Apply it only when the model is running incrementally.
- Compare with the target. Select rows newer than the maximum already loaded.
- Add a lookback window. Reprocess a few days to capture late-arriving rows.
- Define the unique key. Use a key so merges replace rather than duplicate.
- Test the result. Check for duplicates and gaps after each run.

Handling late and updated data
| Situation | Approach |
|---|---|
| Late-arriving events | Reprocess a trailing window and merge on the key |
| Records updated upstream | Use an updated-at column and a merge strategy |
| Deleted source records | Use soft-delete flags or periodic full refresh |
| Schema changes | Set how new columns are handled and refresh when needed |
| Backfills | Run 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.
Related guides
Read snapshots, sources and seeds, change data capture and BigQuery partitioning for related topics.
Incremental checklist
| Item | Done when |
|---|---|
| Key | Unique and tested |
| Filter | Based on a reliable timestamp |
| Lookback | Covers normal late arrivals |
| Strategy | Matches how data changes |
| Refresh | Full refresh procedure documented |
| Cost | Savings 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
| Term | Meaning |
|---|---|
| Incremental model | Model that adds only new rows |
| Merge | Update or insert by key |
| Lookback window | Recent period reprocessed each run |
| Full refresh | Rebuild from scratch |
| Partition | Table 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.
