[Bug Fix] Fix the timestamp casting#17
Conversation
fivetran-joemarkiewicz
left a comment
There was a problem hiding this comment.
@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.
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.
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.
fivetran-avinash
left a comment
There was a problem hiding this comment.
@fivetran-joemarkiewicz Ready for re-review!
fivetran-joemarkiewicz
left a comment
There was a problem hiding this comment.
@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 zonefields by default, causing compilation errors in downstream models in thedbt_zuorapackage. This macro safely removes timezone values from the UTC timestamps and ensures successful compilations of these models.stg_zuora__accountcreated_date,last_invoice_date,tax_exempt_effective_date,tax_exempt_expiration_date,updated_datestg_zuora__amendmentcreated_date,updated_datestg_zuora__contactcreated_date,updated_datestg_zuora__credit_balance_adjustmentcancelled_on,created_date,updated_datestg_zuora__invoice_itemcharge_date,created_date,updated_datestg_zuora__invoice_paymentcreated_date,updated_datestg_zuora__invoicecreated_date,last_email_sent_date,posted_date,updated_datestg_zuora__ordercreated_date,updated_datestg_zuora__payment_methodcreated_date,last_failed_sale_transaction_date,last_transaction_date_time,updated_datestg_zuora__paymentcancelled_on,created_date,settled_on,submitted_on,updated_datestg_zuora__product_rate_plan_chargecreated_date,updated_datestg_zuora__product_rate_plancreated_date,updated_datestg_zuora__productcreated_date,updated_datestg_zuora__rate_plancreated_date,updated_datestg_zuora__rate_plan_chargecreated_date,updated_datestg_zuora__refund_invoice_paymentcreated_date,updated_datestg_zuora__refundcancelled_on,created_date,refund_transaction_time,settled_on,submitted_on,updated_datestg_zuora__subscriptioncancelled_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_datestg_zuora__taxation_itemcreated_date,exchange_rate_date,tax_date,updated_dateDocumentation
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?
⏲️