Bird
0
0

Given this incremental model SQL snippet, what will happen when you run dbt run --full-refresh?

medium📝 Predict Output Q13 of 15
dbt - Incremental Models

Given this incremental model SQL snippet, what will happen when you run dbt run --full-refresh?

{{ config(materialized='incremental') }}

select id, updated_at, data
from source_table

{% if is_incremental() %}
  where updated_at > (select max(updated_at) from {{ this }})
{% endif %}
AThe model will fail because <code>is_incremental()</code> is not allowed.
BOnly new rows with updated <code>updated_at</code> will be added.
CThe entire table will be rebuilt from <code>source_table</code>.
DNothing will change; incremental logic is ignored.
Step-by-Step Solution
Solution:
  1. Step 1: Understand --full-refresh effect

    Running with --full-refresh forces dbt to drop and rebuild the entire incremental model.
  2. Step 2: Analyze the SQL logic

    The is_incremental() block is skipped during full refresh, so no filter applies; all rows are selected.
  3. Final Answer:

    The entire table will be rebuilt from source_table. -> Option C
  4. Quick Check:

    Full refresh rebuilds all data [OK]
Quick Trick: Full refresh rebuilds entire incremental model [OK]
Common Mistakes:
MISTAKES
  • Thinking incremental filter still applies on full refresh
  • Assuming model fails with is_incremental()
  • Believing no data changes on full refresh

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes