fivetran / dbt_hubspot

Data models for Hubspot built using dbt.
https://fivetran.github.io/dbt_hubspot/
Apache License 2.0
33 stars 38 forks source link

Update/crm api v3 - contact_merge_audit table removed #100

Closed fivetran-jamie closed 1 year ago

fivetran-jamie commented 1 year ago

Are you a current Fivetran customer?

internal

What change(s) does this PR introduce?

aligns with recent changes to the hubspot API

i heavily leveraged our iterable code https://github.com/fivetran/dbt_iterable/blob/main/models/intermediate/int_iterable__list_user_unnest.sql

here's a breakdown of the logic/expected output: let's say in the contact table we have 3 records, and their contact_ids are 100, 200, and 300

when we look at property_hs_calculated_merged_vids, it stores the contact ids that should be merged into the main contact_id. the format is vid_to_be_merged:long_number_that_looks_like_epoch_seconds;second_vid_to_merge;another_epoch_time_maybe;...

let's say contact 100 has a property_hs_calculated_merged_vids value of 200:1654364535;300:165404030. this means that contacts 200 and 300 were merged into 100, so only 100 should persist in the final hubspot__contacts model

Did you update the CHANGELOG?

Does this PR introduce a breaking change?

default behavior is different for most users (though they should end up with the same result...so maybe not?)

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

Is this PR in response to a previously created Bug or Feature Request

How did you test the PR changes?

Select which warehouse(s) were used to test the PR

Provide an emoji that best describes your current mood

🧛 **Feedback** We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your [feedback](https://www.surveymonkey.com/r/DQ7K7WW) on our existing dbt packages or what you'd like to see next.