Bird
0
0

A dbt incremental model uses this filter:

medium📝 Debug Q7 of 15
dbt - Performance Optimization
A dbt incremental model uses this filter:
WHERE updated_at > (SELECT MAX(updated_at) FROM {{ this }})

but no new rows are added after source updates. What is the most probable reason?
AThe model is materialized as a view instead of incremental.
BThe model is missing the <code>unique_key</code> configuration.
CThe <code>updated_at</code> column in the source is not properly updated or has no newer values.
DThe dbt version does not support incremental models.
Step-by-Step Solution
Solution:
  1. Step 1: Understand the filter logic

    The incremental filter selects rows where updated_at is greater than the max updated_at in the existing table.
  2. Step 2: Check source data freshness

    If no new rows appear, it likely means the source's updated_at values are not newer than the max in the target table.
  3. Step 3: Other options

    Missing unique_key causes merge issues but not no rows; materialization as view disables incremental; dbt supports incremental for many versions.
  4. Final Answer:

    The source's updated_at column has no newer values -> Option C
  5. Quick Check:

    New rows require newer updated_at values [OK]
Quick Trick: No new rows if source timestamps aren't newer than target [OK]
Common Mistakes:
MISTAKES
  • Assuming missing unique_key causes no rows to appear
  • Confusing materialization type with incremental logic
  • Blaming dbt version without checking data freshness

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More dbt Quizzes