bassel
07/11/2023, 11:59 AMmanuel_garcia
07/11/2023, 12:59 PMsynced
column:
{{
config(
materialized='incremental',
unique_key='id',
)
}}
with base as (
select
id,
column1,
column2,
created_at
from {{ source('integration', 'stream') }}
)
select
id,
column1 as first_name,
column2 as last_name,
created_at
false as synced
from base
{% if is_incremental() %}
where created_at > (select max(created_at) from {{ this }})
{% endif %}
user
07/11/2023, 2:03 PM