Deduplicated records

This commit is contained in:
Joaquin Ossa 2025-02-24 10:57:46 +01:00
parent 2e19678182
commit 62c2e44b86

View file

@ -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