Using Merge for Incremental Models
When to Use Merge Method
Advantages and Trade-offs
Advantages
Trade-offs
Example Implementation
{{
config(
materialized='incremental',
unique_key='event_id',
incremental_strategy='merge' // Default, can be omitted
)
}}
SELECT
event_id,
event_type,
event_time,
user_id,
properties
FROM {{ ref('stg_events') }}
{% if is_incremental() %}
WHERE event_time > (SELECT MAX(event_time) FROM {{ this }})
{% endif %}Fine-Tuning Merge Operations
Step By Step Guide: Merge Method Implementation
Common Issues and Solutions
Issue
Solution
Last updated
Was this helpful?