Bird
0
0

Which incremental strategy should you choose in dbt to efficiently update the table without full reloads?

hard📝 Application Q15 of 15
dbt - Incremental Models
You have a large sales table that updates daily with new sales and corrections to existing sales records. Which incremental strategy should you choose in dbt to efficiently update the table without full reloads?
Amerge, because it updates existing rows and adds new ones
Bdelete+insert, because it deletes all rows and inserts fresh data
Cappend, because it only adds new rows
Dfull refresh, because incremental strategies are not suitable
Step-by-Step Solution
Solution:
  1. Step 1: Analyze data update needs

    The table has new sales and corrections, so existing rows need updates and new rows need inserts.
  2. Step 2: Match strategy to needs

    Append only adds new rows, so it won't update corrections. Delete+insert replaces matching rows but can be costly. Merge efficiently updates and inserts rows incrementally.
  3. Final Answer:

    merge, because it updates existing rows and adds new ones -> Option A
  4. Quick Check:

    merge = update + insert for corrections and new data [OK]
Quick Trick: Use merge for updates plus new rows efficiently [OK]
Common Mistakes:
MISTAKES
  • Choosing append and missing updates
  • Thinking delete+insert always best
  • Ignoring performance of full refresh

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes