Bird
0
0

Why might the merge incremental strategy in dbt be preferred over append when working with slowly changing dimensions?

hard📝 Conceptual Q10 of 15
dbt - Incremental Models
Why might the merge incremental strategy in dbt be preferred over append when working with slowly changing dimensions?
ABecause append is faster and always preferred
BBecause merge deletes all data before inserting new rows
CBecause merge can update existing rows, preserving historical data accuracy
DBecause append supports deleting rows automatically
Step-by-Step Solution
Solution:
  1. Step 1: Understand slowly changing dimensions (SCD)

    SCDs require updating existing rows to reflect changes over time.
  2. Step 2: Compare append and merge

    Append only adds new rows, merge updates existing rows preserving data accuracy.
  3. Final Answer:

    Because merge can update existing rows, preserving historical data accuracy -> Option C
  4. Quick Check:

    Merge updates existing rows, ideal for SCDs [OK]
Quick Trick: Use merge to update existing rows for slowly changing data [OK]
Common Mistakes:
MISTAKES
  • Assuming append updates rows
  • Thinking merge deletes all data
  • Believing append supports deletes

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes