Complete the code to set the incremental strategy to append in a dbt model.
config(materialized='incremental', incremental_strategy='[1]')
The append strategy adds new rows without updating existing ones.
Complete the code to specify the unique key for the merge incremental strategy.
config(materialized='incremental', incremental_strategy='merge', unique_key='[1]')
The unique_key identifies rows to update or insert during a merge.
Fix the error in the incremental filter condition to only process new data.
where updated_at > (select max(updated_at) from [1])
The filter should compare with the max timestamp in the target_table to avoid reprocessing old data.
Fill both blanks to configure a delete+insert incremental strategy with a unique key.
config(materialized='incremental', incremental_strategy='[1]', unique_key='[2]')
The delete+insert strategy deletes existing rows matching the unique_key before inserting new data.
Fill all four blanks to write a merge incremental model with unique key and filter for new data.
config(materialized='incremental', incremental_strategy='[1]', unique_key='[2]') select * from source_table where updated_at > (select max([3]) from [4])
This code sets the merge strategy with id as the unique key and filters rows where updated_at is newer than the max in the target table.