0
0
dbtdata~10 mins

Full refresh vs incremental in dbt - Visual Side-by-Side Comparison

Choose your learning style9 modes available
Concept Flow - Full refresh vs incremental
Start dbt run
Check model config
Run full refresh
Drop and recreate table
Load all data
Finish
Run incremental
Check for new/updated data
Append or update only changed data
Finish
The flow checks if a full refresh is requested; if yes, it rebuilds the entire table. Otherwise, it processes only new or changed data incrementally.
Execution Sample
dbt
model_config:
  materialized: incremental
  full_refresh: false

-- SQL logic for incremental load
This config runs the model incrementally, loading only new or changed data unless full_refresh is set to true.
Execution Table
Stepfull_refresh flagActionData ProcessedResulting Table State
1falseCheck full_refresh flagN/ANo full refresh, proceed incremental
2falseIdentify new/updated rowsOnly new/changed rowsPrepare incremental load
3falseAppend/update incremental dataNew/changed rows addedTable updated incrementally
4falseFinish runN/AIncremental table ready
5trueCheck full_refresh flagN/AFull refresh triggered
6trueDrop existing tableN/ATable dropped
7trueLoad all data freshAll rowsTable rebuilt fully
8trueFinish runN/AFull refresh table ready
💡 Execution stops after finishing either full refresh or incremental load.
Variable Tracker
VariableStartAfter Step 1After Step 5Final
full_refreshfalsefalsetruetrue
data_processednonenew/changed rowsall rowsall rows
table_stateempty or oldincrementally updateddroppedfully rebuilt
Key Moments - 3 Insights
Why does the full refresh drop the table before loading data?
Because full refresh means rebuilding the entire table from scratch, so the old data must be removed first (see execution_table rows 6 and 7).
What happens if full_refresh is false but the source data has no new rows?
The incremental load finds no new or changed rows, so no data is added or updated, and the table remains the same (see execution_table row 2 and 3).
Can incremental mode handle updates to existing rows?
Yes, incremental mode can update existing rows if configured properly, by identifying changed rows and applying updates (see execution_table row 3).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is the table state after step 3 when full_refresh is false?
ATable updated incrementally
BTable dropped
CTable fully rebuilt
DTable empty
💡 Hint
Refer to execution_table row 3 under 'Resulting Table State'
At which step does the full refresh drop the existing table?
AStep 4
BStep 6
CStep 2
DStep 8
💡 Hint
Check execution_table row 6 for the drop action
If full_refresh is set to true, which steps will be executed?
ASteps 1 to 4
BSteps 5 to 8
COnly step 1
DSteps 2 and 3 only
💡 Hint
Look at execution_table rows 5 to 8 for full refresh flow
Concept Snapshot
Full refresh rebuilds the entire table by dropping and reloading all data.
Incremental loads only new or changed data, appending or updating the table.
Use full_refresh: true to force full rebuild.
Use materialized: incremental for efficient updates.
Full refresh is slower but ensures clean state.
Incremental is faster for ongoing data loads.
Full Transcript
This visual execution shows how dbt decides between full refresh and incremental runs. When full_refresh is true, dbt drops the existing table and reloads all data, ensuring a fresh start. When false, it only processes new or changed rows, updating the table incrementally. Variables like full_refresh flag and data_processed change during execution. Key moments include understanding why full refresh drops the table and how incremental handles updates. The quiz tests knowledge of table states and step actions. This helps beginners see exactly what happens step-by-step during dbt runs.