dbt in Practice · Lesson 4 of 5 · 14 min
Incremental models
Process only the new data each run, without missing rows that arrive late.
By default dbt rebuilds every table from scratch on every run. For big tables that is slow and expensive. An incremental model only processes rows that are new since the last run, and adds them to the existing table.
In dbt, the rule looks like this: {% if is_incremental() %} WHERE trip_date > (SELECT MAX(trip_date) FROM {{ this }}) {% endif %}. {{ this }} means the table as it exists right now.