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

Feature/cdm line item #17

Merged
merged 21 commits into from
Aug 14, 2024
Merged

Feature/cdm line item #17

merged 21 commits into from
Aug 14, 2024

Conversation

fivetran-catfritz
Copy link
Contributor

@fivetran-catfritz fivetran-catfritz commented Jun 26, 2024

PR Overview

This PR will address the following Issue/Feature:

  • Quarterly project

This PR will result in the following new package version:

  • v0.3.0 for new model

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

Features

  • Introduced the new recharge__line_item_enhanced model. This model includes a line item enriched with invoice, subscription, payment, and refund information. This model has been built with the intention of retaining a common line item schema across all other Fivetran billing data models.

🚨 Breaking Changes 🚨

  • In the dbt_recharge_source v0.3.0 release, the following columns were added to model stg_recharge__address:
    • country
    • payment_method_id
    • ❗Note: If you have already added any of these fields as passthrough columns to the recharge__address_passthrough_columns var, you will need to remove or alias these fields from the var to avoid duplicate column errors. Refer to the source package's release notes for more details.

Additional source package updates (release notes)

  • Added staging model stg_recharge__checkout. See this doc for the fields added and their definitions.

    • This model is disabled by default but can be enabled by setting variable recharge__checkout_enabled to true in your dbt_project.yml file. See the Enable/disable models and sources section of the README for more information.
    • This model can also be passed additional columns beyond the predefined columns by using the variable recharge__checkout_passthrough_columns. See the Passing Through Additional Columns section of the README for more information on how to set this variable.
  • Added the following columns to model stg_recharge__customer. See this doc for field definitions.

    • billing_first_name
    • billing_last_name
    • billing_company
    • billing_city
    • billing_country

PR Checklist

Basic Validation

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

  • dbt run –full-refresh && dbt test
  • 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:

  • See internal ticket for schema sample.

If you had to summarize this PR in an emoji, which would it be?

💃

@fivetran-catfritz fivetran-catfritz changed the base branch from main to release/v0.3.0 June 27, 2024 17:00
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.

@fivetran-catfritz great work on this PR! I just a have a few requested changes before this is ready for full approval! Thanks again 😃

README.md Show resolved Hide resolved
integration_tests/seeds/checkout_data.csv Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Thanks for the comments! This is ready for re-review. I added as much documentation as I could minus the field definitions we will add later.

integration_tests/seeds/checkout_data.csv Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
models/common data models/recharge__line_item_enhanced.sql Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
README.md Show resolved Hide resolved
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.

@fivetran-catfritz thanks for these most recent changes! This is looking great and real close but I have just a few questions before approval.

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
models/common_data_models/docs.md Outdated Show resolved Hide resolved
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- header_id
- line_item_index
Copy link
Collaborator

Choose a reason for hiding this comment

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

Be sure to include the source_relation field here. I missed this originally but you will need to include that field in this test and also in all the joins within the new model.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Recharge is not yet a member of the union data club. 😄

Copy link
Collaborator

Choose a reason for hiding this comment

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

It's not cool yet haha then nevermind, disregard my comment lol

Copy link
Collaborator

Choose a reason for hiding this comment

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

For some reason I keep getting this failure when trying to run this using the seed data and having the using checkout variable enabled as true. Any ideas?

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh I needed to update the dbt_project.yml with the seed column type to match what I did in the source.

Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Thanks for the comments! I made the necessary updates and have one more question about the docs. Thanks!

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ahh I needed to update the dbt_project.yml with the seed column type to match what I did in the source.

models/common_data_models/docs.md Outdated Show resolved Hide resolved
- dbt_utils.unique_combination_of_columns:
combination_of_columns:
- header_id
- line_item_index
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Recharge is not yet a member of the union data club. 😄

Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz I have updated the doc yml and generated the dbt docs!

packages.yml Outdated Show resolved Hide resolved
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!

@fivetran-joemarkiewicz fivetran-joemarkiewicz changed the base branch from release/v0.3.0 to main August 6, 2024 05:44
Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

Agree with selection for customer_created_at and subscription_plan.

Copy link
Contributor

@fivetran-reneeli fivetran-reneeli left a comment

Choose a reason for hiding this comment

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

looks good!

@fivetran-catfritz fivetran-catfritz merged commit e9e85ff into main Aug 14, 2024
8 checks passed
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.

3 participants