Snippets Collections
{{ 
	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 %}
    
)
star

Sat May 06 2023 14:45:35 GMT+0000 (Coordinated Universal Time)

#dbt #incremental #materialize

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension