Closed brettkobo closed 2 years ago
Hi @brettkobo thanks so much for raising this issue. This issue is most likely related to this PR from our dbt_hubspot_source package. The legacy version of the hubspot connector synced the completion_date
field within the engagement_task
table as a string and our package corrected this to convert to a timestamp.
However, it seems that the new history mode for hubspot syncs this field correctly as a timestamp. Would you be able to confirm what the datatype of the completion_date
field is within your hubspot source engagement_task
table? If this truly is a timestamp then we can combine the efforts of the feature request #54 with this bug fix as this seems it is a result of the history mode for hubspot syncing a different datatype for this field.
Looks like it is coming out of Fivetran as a timestamp_tz(9). I am also able to query the raw table from Snowflake with no problem. So I assume it is working correctly from there.
@brettkobo thanks so much for providing the screenshot, this is extremely helpful! It looks like the datatype for the completion_date
has changed in the newer version of the hubspot connector.
Previously this field was synced as a string and our package correctly changed the datatype to a timestamp. However, now it is being synced as a timestamp and understandably snowflake does not want to cast a timestamp to a timestamp.
I will investigate this some more and will let you know here once we have a working branch for you to try out!
Hi @brettkobo I apologize for the delayed response. I have been able to dive into this a bit more and was able to push a commit to a working branch that I feel should resolve this error. You can give this a try by using the below config in your packages.yml
.
packages:
- git: https://github.com/fivetran/dbt_hubspot.git
revision: feature/timestamp-fix
warn-unpinned: false
I am still working with our product team to gain an understanding of why this field may have a different datatype in other warehouses, but this should work in the meantime. Let me know if you have any questions. Thanks!
Hi @brettkobo just wanted to check back in if this update ended up working for you?
@brettkobo the fix for this has been applied to the latest release of the dbt_hubspot_source package! You should be able to re-run your project models at the top of the hour to reflect the changes within dbt_hubspot_sourcev0.4.3
once they are live on the dbt hub.
Please feel free to open a new issue if you have any questions or requests. Thanks!
Are you a current Fivetran customer? Hello name name is Brett Kobold and I am currently a customer of Fivetran under the account Retina.AI
Describe the bug When I run the models, I get an error for the hubspot_engagment_table. I have pasted the error below. I am not sure what coloum is failing to CAST and I believe I do not have custom properies on engagments.
Steps to reproduce Run FiveTran for hubspot tables, excluding any history tables to redunce number of calls. Install the hubspot DBT package. dbt_run on DBT cloud. Get error that can't TRY_CAST timestamps. Go check Snowflake to see if tables were created.
Expected behavior I expected the engagement tasks table to be created, currently I do not see that in my Snowflake instance.
Project variables configuration
Package Version
Warehouse
- [ ] BigQuery - [ ] Redshift - [ X] Snowflake - [ ] Postgres - [ ] Databricks - [ ] Other (provide details below) **Additional context** **Screenshots** ![image](https://user-images.githubusercontent.com/8419147/129097207-1b0ff728-065e-4643-92ff-15bf5f87a963.png) **Please indicate the level of urgency** This isn't critical but I would like to have all the tables built as I will be doing reporting on SDRs this week and their different engagements within Hubspot **Are you interested in contributing to this package?**I just started working with DBT but would be happy to help in the future on development. I know SQL.