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/update joins #13

Merged
merged 8 commits into from
Sep 14, 2023
Merged

Feature/update joins #13

merged 8 commits into from
Sep 14, 2023

Conversation

fivetran-catfritz
Copy link
Contributor

PR Overview

This PR will address the following Issue/Feature: #12

This PR will result in the following new package version:

  • 1.1
  • Not breaking since it is a join update, not adding or removing columns.

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

  • Updated the join logic for recharge__subscription_overview to produce more accurate results.
  • Since we now know purchase_item_id = subscription_id for subscriptions. Update join from:
    from subscriptions
    left join customers_charge_lines
        on customers_charge_lines.customer_id = subscriptions.customer_id
        and customers_charge_lines.address_id = subscriptions.address_id
        and customers_charge_lines.external_product_id_ecommerce = subscriptions.external_product_id_ecommerce

to

    from subscriptions
    left join customers_charge_lines
        on customers_charge_lines.purchase_item_id = subscriptions.subscription_id

PR Checklist

Basic Validation

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

  • dbt compile
  • dbt run –full-refresh (ok but no incrementals)
  • dbt run
  • dbt test
  • dbt run –vars (if applicable)

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

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.
  • See internal ticket

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • README updates have been applied (if applicable)
  • DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates)

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

💃

@fivetran-catfritz fivetran-catfritz linked an issue Sep 11, 2023 that may be closed by this pull request
4 tasks
@fivetran-catfritz fivetran-catfritz self-assigned this Sep 11, 2023
Copy link
Contributor

@fivetran-jamie fivetran-jamie left a comment

Choose a reason for hiding this comment

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

lgtm! just a changelog suggestion and 1 question to better understand the change

CHANGELOG.md Show resolved Hide resolved
models/recharge__subscription_overview.sql Show resolved Hide resolved
packages.yml Outdated
version: [">=0.1.0", "<0.2.0"]
# - package: fivetran/recharge_source
# version: [">=0.1.0", "<0.2.0"]
- git: https://github.com/fivetran/dbt_recharge_source.git
Copy link
Contributor

Choose a reason for hiding this comment

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

obligatory reminder to update before release

@fivetran-catfritz fivetran-catfritz merged commit 0c5f0af into main Sep 14, 2023
1 check 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.

[Feature] Update joins for recharge__subscription_overview.sql
2 participants