Bird
0
0

Given this incremental model SQL snippet:

medium📝 Predict Output Q4 of 15
dbt - Incremental Models
Given this incremental model SQL snippet:
select * from source_table where updated_at > (select max(updated_at) from {{ this }})

What happens when you run dbt run without full refresh?
ANo rows are added because the filter is incorrect.
BThe entire table is dropped and rebuilt.
CAll rows from source_table are appended regardless of updated_at.
DOnly rows with updated_at newer than existing max are added.
Step-by-Step Solution
Solution:
  1. Step 1: Understand incremental filter logic

    The query selects rows where updated_at is greater than the max in the current table, so only new or updated rows are added.
  2. Step 2: Confirm behavior without full refresh

    Without full refresh, dbt appends only these filtered rows, not rebuilding the whole table.
  3. Final Answer:

    Only rows with updated_at newer than existing max are added. -> Option D
  4. Quick Check:

    Incremental adds only newer rows by filter [OK]
Quick Trick: Incremental filters new rows by max timestamp [OK]
Common Mistakes:
MISTAKES
  • Thinking entire table is rebuilt without full refresh
  • Assuming all rows append regardless of filter
  • Believing no rows are added due to filter

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes