Bird
0
0

Which approach is best?Use materialized='incremental' with is_incremental() filter on sale_date.Run dbt run daily for incremental updates.Run dbt run --full-refresh when you need a full rebuild.What is the main benefit of this approach?

hard📝 Application Q15 of 15
dbt - Incremental Models

You have a large sales table that updates daily. You want to use dbt incremental models to update only new sales but also occasionally rebuild the entire table to fix data issues. Which approach is best?

  1. Use materialized='incremental' with is_incremental() filter on sale_date.
  2. Run dbt run daily for incremental updates.
  3. Run dbt run --full-refresh when you need a full rebuild.

What is the main benefit of this approach?

AIt always reloads all data, ensuring no data is missed.
BIt saves time by only processing new data daily and allows full rebuilds when needed.
CIt never rebuilds the table, so data issues cannot be fixed.
DIt requires manual deletion of old data before each run.
Step-by-Step Solution
Solution:
  1. Step 1: Understand incremental daily updates

    Using incremental materialization with a filter on sale_date loads only new sales daily, saving time.
  2. Step 2: Understand full refresh usage

    Running with --full-refresh rebuilds the entire table to fix data issues when needed.
  3. Step 3: Identify main benefit

    This approach balances efficiency and data correctness by updating incrementally and allowing full rebuilds.
  4. Final Answer:

    It saves time by only processing new data daily and allows full rebuilds when needed. -> Option B
  5. Quick Check:

    Incremental + full refresh = efficient and flexible [OK]
Quick Trick: Incremental daily + full refresh occasionally = best practice [OK]
Common Mistakes:
MISTAKES
  • Thinking full refresh runs every day
  • Believing incremental never rebuilds data
  • Assuming manual data deletion is required

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes