Learn how world-class data teams use dbt to build reliable, maintainable, and scalable data models.
{{
config(
materialized='incremental',
unque_key=['user_id'],
on_schema_change='append_new_columns',
full_refresh=false
)
}}
select
id as user_id,
email,
created_at
from {{ ref('stg__users') }}
{% if is_incremental() %}
where created_at > (
select max(created_at)
from {{ this }}
)
{% endif %}