Bird
0
0

Given this incremental model using the append strategy:

medium📝 Predict Output Q4 of 15
dbt - Incremental Models
Given this incremental model using the append strategy:
{{ config(materialized='incremental', incremental_strategy='append') }}
select id, value from source_table where updated_at > (select max(updated_at) from {{ this }})

What will happen when this model runs?
AAll rows from source_table replace the target table
BOnly new rows with updated_at greater than max in target are added
CExisting rows are updated based on id
DThe model will fail due to syntax error
Step-by-Step Solution
Solution:
  1. Step 1: Understand append strategy behavior

    Append adds only new rows, no updates to existing rows.
  2. Step 2: Analyze filter condition

    The filter selects rows with updated_at greater than max in target, so only new rows are added.
  3. Final Answer:

    Only new rows with updated_at greater than max in target are added -> Option B
  4. Quick Check:

    Append adds new rows filtered by updated_at [OK]
Quick Trick: Append adds only new rows filtered by timestamp [OK]
Common Mistakes:
MISTAKES
  • Thinking append updates existing rows
  • Assuming full table replacement
  • Confusing filter logic

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes