Closed kandji-alex closed 1 year ago
Hi @kandji-alex thanks for opening this issue.
Perhaps Hubspot internally changed something in their database
I believe you hit the nail on the head the head with this statement. HubSpot recently release a new API and as far as I am aware one of the implications was that all time fields were converted to timestamp_tz. There was nothing that was adjusted within this dbt package (although we are working to update the package to account for the API changes), but rather the change came from the Fivetran connector adjusting to account for the new HubSpot API.
I am currently working at the moment to understand these HubSpot changes further. However, our support and product teams should be able to add more information and details around the connector change. I would highly recommend opening a support ticket where you will likely be able to get more insight around this connector change.
the fix for this should officially be in v0.9.0 of the package!
Is there an existing issue for this?
Describe the issue
We're ingesting custom Hubspot fields via
hubspot__deal_pass_through_columns
argument.When these are timestamps, some appear to be created in Hubspot's database as a NUMBER(38) while others are TIMESTAMP_TZ.
We're converting the NUMBER ones into timestamps in downstream dbt models.
HOWEVER, one of these fields has changed from a NUMBER to a TIMESTAMP_TZ unexpectedly. This broke our dbt snapshots on this data.
The Hubspot users have ensured me they did nothing to that field. Perhaps Hubspot internally changed something in their database, or perhaps the end users did alter something without realizing.
Either way, this field was being built as a NUMBER for months, and then randomly switched to a TIMESTAMP_TZ. I was able to find the query in the Snowflake history, in which Fivetran issued a simple
alter
statement to this table and started upserting with the new time after that. I'm not able to pin down an event that would've caused this change.Relevant error log or model output
Expected behavior
I expect these source tables with custom fields to never change underlying datatype unless something actively seeks to do so.
dbt Project configurations
hubspot__deal_pass_through_columns:
Package versions
What database are you using dbt with?
snowflake
dbt Version
Additional Context
No response
Are you willing to open a PR to help address this issue?