-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix/timestamp-without-time-zone #5
bugfix/timestamp-without-time-zone #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some recommendations to the CHANGELOG and one clarifying question, but this should be good to go!
CHANGELOG.md
Outdated
|
||
## 🚨 Breaking Changes: Bug Fixes 🚨 | ||
- Casted the following timestamp fields in the below models using the `dbt.type_timestamp()` macro. This is necessary to ensure all timestamps are consistently casted and do not experience datatype mismatches in downstream transformations. | ||
- stg_qualtrics__contact_mailing_list_membership |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add `` to each of these models for better readability. (i.e. stg_qualtrics__contact_mailing_list_membership
). (Probably the fields too but I'll leave that up to you!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I actually did have `` added to each table and field and it turned into quite the eye soar lol. I think adding the backticks to the tables only should be a good middle ground.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -32,7 +32,7 @@ final as ( | |||
mailing_list_id, | |||
name, | |||
owner_id as owner_user_id, | |||
unsubscribe_date as unsubscribed_at, | |||
cast(unsubscribe_date as {{ dbt.type_timestamp() }}) as unsubscribed_at, | |||
unsubscribed as is_unsubscribed, | |||
_fivetran_synced, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we cast _fivetran_synced
as timestamp as well, or are we 100% confident this field will always be not null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we don't use _fivetran_synced
anywhere else I feel confident that we shouldn't have to cast this field. Additionally since this is a Fivetran generated field I feel comfortable that this should be the datatype we assume.
CHANGELOG.md
Outdated
- survey_link_expires_at | ||
- stg_qualtrics__survey_response | ||
- finished_at | ||
- is_finished |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can remove is_finished
, it was not updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why that snuck in there. Probably an artifact of copy/paste. Thanks for catching!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
PR Overview
This PR will address the following Issue/Feature: Internally raised Issue
This PR will result in the following new package version:
v0.2.0
This likely won't be breaking for the majority of users. However, this will be changing the datatypes of a number of fields to
timestamp without time zone
; whereas, before they weretimestamp with time zone
. Therefore, we will mark this as breaking.Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
🚨 Breaking Changes: Bug Fixes 🚨
dbt.type_timestamp()
macro. This is necessary to ensure all timestamps are consistently casted and do not experience datatype mismatches in downstream transformations.Under the Hood
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
None of these changes really need any validating in the source package, so the core of the validation is done in combination with the downstream dbt_qualtrics package.
First I recreated the issue by setting up a new Qualtrics connector (for Redshift) and attempted to use the production version of the package. Alas, I saw the same error as documented:
I then installed the local version of the qualtrics package with these changes included and saw the errors resolved!
If you had to summarize this PR in an emoji, which would it be?
⏲️