Skip to content
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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Release/0.4.0 #10

wants to merge 13 commits into from

Conversation

fivetran-reneeli
Copy link
Contributor

@fivetran-reneeli fivetran-reneeli commented Nov 18, 2024

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

  • Added the ability to disable models related to the USAGE_RECORD source table. Refer to the README for more details.

Under the hood

  • Removes references to unused models in twilio__message_enhanced.

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt run –full-refresh && dbt test
  • [na] dbt run (if incremental models are present) && dbt test

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

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?

💃

@fivetran-reneeli fivetran-reneeli self-assigned this Nov 18, 2024
@@ -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
Copy link
Contributor Author

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.

Copy link
Collaborator

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a 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') }}
Copy link
Collaborator

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!

Comment on lines -7 to -11
incoming_phone_number as (

select *
from {{ var('incoming_phone_number')}}
),
Copy link
Collaborator

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.
Copy link
Collaborator

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated!

Comment on lines +2 to +7
# - 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
Copy link
Collaborator

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
Copy link
Collaborator

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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

Copy link
Collaborator

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') }}"

Copy link
Contributor Author

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 Show resolved Hide resolved
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.
Copy link
Contributor

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?

Copy link
Contributor Author

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:
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

@fivetran-avinash fivetran-avinash left a 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!

fivetran-reneeli and others added 2 commits November 26, 2024 14:10
Co-authored-by: Avinash Kunnath <[email protected]>
@fivetran-reneeli
Copy link
Contributor Author

also added updates to address #11

@fivetran-reneeli fivetran-reneeli linked an issue Nov 26, 2024 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Documentation] Move badges below H1 heading
3 participants