medium10 pts · first answer countsdbtincremental-loads
Filtering new rows in dbt
In a dbt incremental model, what does the is_incremental() block do?
select * from {{ ref('stg_events') }}
{% if is_incremental() %}
where event_ts > (select max(event_ts) from {{ this }})
{% endif %}Discussion 0
Join free to post in the discussion.
Related questions
- What a dbt model isData Engineer
- Built-in dbt testsData Engineer
- Incremental load with updated_atData Engineer
- Upserting into a target tableData Engineer
- Why use ref() in dbtData Engineer
- Detecting stale source dataData Engineer
- Applying CDC eventsData Engineer
- Rows missed by a strict watermarkData Engineer