-
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
Release/0.4.0 #10
base: main
Are you sure you want to change the base?
Release/0.4.0 #10
Conversation
@@ -72,6 +72,8 @@ By default, all variables are assumed to be `true`. | |||
vars: | |||
using_twilio_call: False # Disable this if not using call | |||
using_twilio_messaging_service: False # Disable this if not using messaging_service | |||
using_twilio_usage_record: False # Disable this if not using usage_record |
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.
our standard way would be twilio__using_usage_record
, but then I should also update using_twilio_call
and using_twilio_messaging_service
, which would require users who already have those variables configured to change it, which would be more of a hassle customer-experience wise.
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.
LGTM with just a few comments to be addressed before moving to release review. These changes aren't a cause for blocking initial approval, but please be sure to address before opening up for release review and regenerate the docs.
@@ -3,20 +3,23 @@ | |||
with messages as ( | |||
|
|||
select * | |||
from {{ ref('int_twilio__messages')}} | |||
from {{ ref('int_twilio__messages') }} |
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.
Thanks for making these formatting changes to ensure we have consistent formatting!
incoming_phone_number as ( | ||
|
||
select * | ||
from {{ var('incoming_phone_number')}} | ||
), |
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.
Wow I didn't realize incoming phone number was included here as well even with it not being referenced. Thanks for removing!
CHANGELOG.md
Outdated
# dbt_twilio v0.4.0 | ||
|
||
## Features | ||
- Added the ability to disable models related to the `USAGE_RECORD` source table. Refer to the [README](https://github.com/fivetran/dbt_twilio?tab=readme-ov-file#step-4-enablingdisabling-models) for more details. |
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.
Can we include the variable here in the CHANGELOG so customers are immediately aware of it. We can/should still link to the README, but would be good to share the variable as well.
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!
# - package: fivetran/twilio_source | ||
# version: [">=0.3.0", "<0.4.0"] | ||
|
||
- git: https://github.com/fivetran/dbt_twilio_source.git | ||
revision: usage_record_enable_config | ||
warn-unpinned: false |
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.
Reminder to update before merge.
round( cast(sum(messages.price) as {{ dbt.type_numeric() }}), 2) * -1 as total_messages_spend | ||
|
||
{% if var('using_twilio_usage_record', True) %} | ||
, round( cast(sum(usage_record.price) as {{ dbt.type_numeric() }}), 2) as total_account_spend |
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.
Can you update the documentation for this field here to add a disclaimer that this will only be present if the using_twilio_usage_record
variable is defined as true (default being true).
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.
added
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.
For this change there is no need for a set of validation tests since this is not directly making any changes to the underlying model logic. However, would you be able to add the following model config so we can use it for review testing and future validation testing once we add it to this package.
models:
+schema: "twilio_{{ var('directed_schema','dev') }}"
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.
that's a good point, thanks for dropping that config! i added
CHANGELOG.md
Outdated
# dbt_twilio v0.4.0 | ||
|
||
## Features | ||
- Added the ability to disable the `USAGE_RECORD` source table and its downstream fields via variable `using_twilio_usage_record` (default `true`). Refer to the [README](https://github.com/fivetran/dbt_twilio?tab=readme-ov-file#step-4-enablingdisabling-models) for more details. |
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 call out that this variable can be disabled in twilio__account_overview
and total_account_spend
will now be removed if this variable is disabled?
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.
Good point, added that language!
dispatch: | ||
- macro_namespace: dbt_utils | ||
search_order: ['spark_utils', 'dbt_utils'] | ||
|
||
models: |
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.
More of a question: There weren't any validation tests added, so was this just for future use? Did we think it wouldn't have been useful to add a row comparison test given the changes weren't significant enough to the code?
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! Yup just for future use. No validation tests for this PR since this isn't really changing any model.
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-reneeli A few comments before approving!
Co-authored-by: Avinash Kunnath <[email protected]>
also added updates to address #11 |
PR Overview
This PR will address the following Issue/Feature:
#10
This PR will result in the following new package version: v0.4.0
Made breaking change since disabling usage_record could impact the fields in the downstream models.
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
Features
USAGE_RECORD
source table. Refer to the README for more details.Under the hood
twilio__message_enhanced
.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:
Not much validation since these models were not used in the first place, but just ensuring that the models are removed in the documentation and in any mentions downstream.
And that disabling the usage_record source table via
using_twilio_usage_record
will still allow downstream models to run, without the usage_record fields.If you had to summarize this PR in an emoji, which would it be?
💃