v1.3.0 dbt_hubspot
·
10 commits
to main
since this release
PR #186 and PR #187 include the following updates:
Schema/Data Change
8 total changes • 6 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
stg_hubspot__owner_teamstg_hubspot__formstg_hubspot__rolestg_hubspot__teamstg_hubspot__team_userstg_hubspot__users |
New column | is_deleted (aliased from _fivetran_deleted) |
Boolean indicating whether a record has been deleted in Hubspot and/or inferred deleted in Hubspot by Fivetran | |
| All models | New column | source_relation |
Identifies the source connection when using multiple hubspot connections | |
hubspot__company_history |
Updated surrogate key | id = company_id + field_name + valid_from |
id = source_relation + company_id + field_name + valid_from |
|
hubspot__contact_history |
Updated surrogate key | id = contact_id + field_name + valid_from |
id = source_relation + contact_id + field_name + valid_from |
|
hubspot__deal_history |
Updated surrogate key | id = deal_id + field_name + valid_from |
id = source_relation + deal_id + field_name + valid_from |
|
hubspot__daily_ticket_history |
Updated surrogate key | ticket_day_id = date_day + ticket_id |
ticket_day_id = source_relation + date_day + ticket_id |
|
int_hubspot__pivot_daily_ticket_historyint_hubspot__ticket_calendar_spine |
Updated surrogate key | id = date_day + ticket_id |
id = source_relation + date_day + ticket_id |
|
int_hubspot__daily_ticket_history |
Updated surrogate key | id = date_day + ticket_id + field_name |
id = source_relation + date_day + ticket_id + field_name |
Additional Breaking Changes
If you are currently using the hubspot__company_pass_through_columns or hubspot__deal_pass_through_columns variables to persist the _fivetran_deleted field, please add an alias to avoid duplicate column errors.
Please note that
_fivetran_deletedis coalesced with theis_<company/deal>_eabledfield present in thehubspot__companies,hubspot__deals, andhubspot__deal_stagesmodels.
vars:
hubspot__company_pass_through_columns:
- name: "_fivetran_deleted"
alias: "_fivetran_company_deleted" # Can choose any alias other than _fivetran_deleted
hubspot__deal_pass_through_columns:
- name: "_fivetran_deleted"
alias: "_fivetran_deal_deleted" # Can choose any alias other than _fivetran_deletedFeature Update
- Union Data Functionality: This release supports running the package on multiple hubspot source connections. See the README for details on how to leverage this feature.
- Coalesces
is_<company/deal>_deletedwith_fivetran_deletedinstg_hubspot__companyandstg_hubspot__deal.
Tests Update
- Removes uniqueness tests. The new unioning feature requires combination-of-column tests to consider the new
source_relationcolumn in addition to the existing primary key, but this is not supported across dbt versions. - These tests will be reintroduced once a version-agnostic solution is available.
We have kept uniqueness tests on the surrogate keys listed above.
Under the Hood
- Ensures that the
datatypeconfig of_fivetran_deleted/is_deleteduses the cross-compatibledbt.type_boolean()macro.
Contributors
Full Changelog: v1.2.0...v1.3.0