Closed shreveasaurus closed 2 years ago
Hi @shreveasaurus thanks so much for opening this issue. This is a type of issue we have actually seen quite a bit of within a few of our other packages. The primary reason is due to Fivetran syncing the timestamp fields for Redshift warehouses as timestamptz
which does is not able to be leveraged within downstream date functions.
Within other packages we have resolved this by casting the timestamp fields in the staging models with {{ dbt_utils.type_timestamp() }}
to safely convert to timestamp
that may be used in those downstream date functions. See here for how we recently addressed this within our dbt_greenhouse_source package.
I noticed you mentioned you would be open to creating a PR! If that is still of interest to you, then all that would need to be done is to convert the staging models that use timestamp fields with the dbt_utils.type_timestamp() macro. Let me know if you would still be interested in opening a PR! Otherwise, my team can tackle this in our next sprint. Thanks!
Thanks @fivetran-joemarkiewicz for the thoughtful response and nudging me in the right direction! I tested casting the timestamps as you suggested locally and all models in the package are building as expected. I'll give opening a PR a go and let you know if I have any questions. Thanks again!
Hello @shreveasaurus ! I've just cut the release for your PR, you should see it within the next hour or so. Thank you again for your awesome work on this PR and looking forward to new PRs in the future! 🥳
Is there an existing issue for this?
Describe the issue
The asana__task failed to build due to a function error.
Relevant error log or model output
Expected behavior
The model asana__task should build successfully without error(s).
dbt Project configurations
Package versions
packages:
What database are you using dbt with?
redshift
dbt Version
1.0.8
Additional Context
No response
Are you willing to open a PR to help address this issue?