-
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
[Bug Fix] Fix the timestamp casting #17
base: main
Are you sure you want to change the base?
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.
@fivetran-avinash, generally looking good but a small questions and some light change requests before pre-release approval
models/stg_zuora__subscription.sql
Outdated
cast(subscription_end_date as {{ dbt.type_timestamp() }}) as subscription_end_date, | ||
cast(subscription_start_date as {{ dbt.type_timestamp() }}) as subscription_start_date, |
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.
Are we sure these are timestamps? When looking at live data in BQ they are showing as date
🤔
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.
They are not. I think I added them to fix the date/timestamp union error you were seeing in the line_item_enhanced
model. But I'm going to remove these and keep the initial date format and only apply casting changes there.
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.
@fivetran-joemarkiewicz Ready for re-review!
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.
@fivetran-avinash thanks for these updates - this looks ready for pre-release!
PR Overview
This PR will address the following Issue/Feature: Internal ticket plus [#15]
This PR will result in the following new package version: v0.2.2
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
Bug Fixes
{{ dbt.type_timestamp() }}
macro within the staging models for all timestamp fields. (#17)timestamp with time zone
fields by default, causing compilation errors in downstream models in thedbt_zuora
package. This macro safely removes timezone values from the UTC timestamps and ensures successful compilations of these models.stg_zuora__account
created_date
,last_invoice_date
,tax_exempt_effective_date
,tax_exempt_expiration_date
,updated_date
stg_zuora__amendment
created_date
,updated_date
stg_zuora__contact
created_date
,updated_date
stg_zuora__credit_balance_adjustment
cancelled_on
,created_date
,updated_date
stg_zuora__invoice_item
charge_date
,created_date
,updated_date
stg_zuora__invoice_payment
created_date
,updated_date
stg_zuora__invoice
created_date
,last_email_sent_date
,posted_date
,updated_date
stg_zuora__order
created_date
,updated_date
stg_zuora__payment_method
created_date
,last_failed_sale_transaction_date
,last_transaction_date_time
,updated_date
stg_zuora__payment
cancelled_on
,created_date
,settled_on
,submitted_on
,updated_date
stg_zuora__product_rate_plan_charge
created_date
,updated_date
stg_zuora__product_rate_plan
created_date
,updated_date
stg_zuora__product
created_date
,updated_date
stg_zuora__rate_plan
created_date
,updated_date
stg_zuora__rate_plan_charge
created_date
,updated_date
stg_zuora__refund_invoice_payment
created_date
,updated_date
stg_zuora__refund
cancelled_on
,created_date
,refund_transaction_time
,settled_on
,submitted_on
,updated_date
stg_zuora__subscription
cancelled_date
,contract_acceptance_date
,contract_effective_date
,created_date
,original_created_date
,service_activation_date
,subscription_end_date
,subscription_start_date
,term_end_date
,term_start_date
,updated_date
stg_zuora__taxation_item
created_date
,exchange_rate_date
,tax_date
,updated_date
Documentation
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:
See corresponding transform PR + height ticket
If you had to summarize this PR in an emoji, which would it be?
⏲️