diff --git a/models/staging/resolutions/stg_resolutions__incidents.sql b/models/staging/resolutions/stg_resolutions__incidents.sql index 173468b..a1efe8d 100644 --- a/models/staging/resolutions/stg_resolutions__incidents.sql +++ b/models/staging/resolutions/stg_resolutions__incidents.sql @@ -1,4 +1,8 @@ -with raw_incident as (select * from {{ source("resolutions", "incident") }}) +with + raw_incident as (select * from {{ source("resolutions", "incident") }}), + deduped_verifications as ( + {{ cosmos_db_record_deduplication("raw_incident", "id") }} + ) select -- Basic Incident Details {{ adapter.quote("documents") }} ->> 'id' as id_incident, @@ -278,4 +282,4 @@ select (({{ adapter.quote("documents") }} ->> '_ts'))::integer ) as cosmos_db_timestamp_utc -from raw_incident +from deduped_verifications