Closed lordhumunguz closed 3 years ago
@fadhguru thank you for creating this issue, and it was great meeting you earlier today.
We'll add this feature request to our backlog and let you know when this is implemented.
@fadhguru this has been adding to our recent v0.4.2
release of the dbt_stripe package!!
This release will most likely be live on the dbt hub by Monday morning. Closing this ticket as the feature request has been integrated into the package. Please feel free to reach back out or create a new ticket if you have any further questions or requests.
Context
Currently the stripe data is ingested as UTC and transformed as UTC as well (AFAIK), which causes the numbers to mismatch with the Stripe dashboard.
Proposal
Adding a new (optional) variable that will cast any
DATETIME
orDATE
fields into a specific timezone. Eg. forstripe_customer_overview
model, add a new field like:DATETIME(customer.created_at, '{{ var("timezone") }}') as created_at_tz
.That way, the original
created_at
datetime in UTC is still preserved, and the end user has the option to usecreated_at_tz
for a localized timezone.Similarly for
stripe_daily_overview
, addingdate_tz
columns for the WITH statements --daily_balance_transactions
anddaily_failed_charges
, as well as optionally joining ondate_tz
if a timezone var is present.