{{ config( materialized="incremental", unique_key="page_view_id" -- This line is the key to replace duplicates ) }} with events as ( select * from {{ source('schema', 'table') }} {% if is_incremental() %} where collector_tstamp >= ( select dateadd('day', -3, max(max_collector_tstamp)) from {{ this }} {% endif %} )
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter