fivetran / dbt_klaviyo

https://fivetran.github.io/dbt_klaviyo/
Apache License 2.0
5 stars 6 forks source link

BUG - incorporate `source_relation` into the `unique_key` for incremental models #13

Closed fivetran-jamie closed 2 years ago

fivetran-jamie commented 2 years ago

Are you a current Fivetran customer?

fivetran made issue

Describe the bug

i haven't come across an error yet, but i just realized we missed a spot where we need to add source_relation. so in the incremental model configs, we provide event_id as the unique key, but we should really be making a surrogate key hashed on event id and the source relation for proper merging and such.

https://github.com/fivetran/dbt_klaviyo/blob/main/models/intermediate/int_klaviyo__event_attribution.sql#L4

and

https://github.com/fivetran/dbt_klaviyo/blob/main/models/klaviyo__events.sql#L4

Please indicate the level of urgency

not super urgent i suppose, but it would be a very quick fix

Are you interested in contributing to this package?

fivetran-joemarkiewicz commented 2 years ago

This fix has been merged into the latest release of the package!