ScenarioADVANCEDDifficulty: ADVANCEDData engineering~10 min
Why is this incremental model reprocessing everything?
A dbt incremental model passes every test but its runtime grows every day, and the warehouse bill with it.
sql{{ config(materialized='incremental', unique_key='order_id') }}
select * from {{ ref('stg_orders') }}
{% if is_incremental() %}
where updated_at > (select max(updated_at) from {{ this }})
{% endif %}
Give two plausible causes.