Bird
0
0

You have a large dataset with frequent updates and deletes. You want to optimize your dbt incremental model for performance and data accuracy. Which combination of strategies or techniques is best?

hard📝 Application Q9 of 15
dbt - Incremental Models
You have a large dataset with frequent updates and deletes. You want to optimize your dbt incremental model for performance and data accuracy. Which combination of strategies or techniques is best?
AUse delete+insert strategy with unique_key and partition pruning
BUse append strategy with a filter on updated_at timestamp
CUse merge strategy with a unique_key and incremental filter
DUse full refresh daily and append strategy hourly
Step-by-Step Solution
Solution:
  1. Step 1: Analyze dataset needs

    Frequent updates and deletes require handling all changes accurately.
  2. Step 2: Evaluate strategies

    Append cannot handle deletes; merge handles updates/inserts but not deletes; delete+insert handles updates, inserts, and deletes.
  3. Step 3: Optimize performance

    Using partition pruning with delete+insert reduces data scanned and improves speed.
  4. Final Answer:

    Use delete+insert strategy with unique_key and partition pruning -> Option A
  5. Quick Check:

    Delete+Insert + partition pruning = best for updates and deletes [OK]
Quick Trick: Combine delete+insert with partition pruning for large changing data [OK]
Common Mistakes:
MISTAKES
  • Using append when deletes exist
  • Ignoring partition pruning for performance
  • Mixing full refresh with incremental without plan

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes