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

renamed subscription to subscription_history #37

Conversation

nachimehta
Copy link

@nachimehta nachimehta commented Apr 11, 2022

Pull Request
Are you a current Fivetran customer?
No. I am a SI. Nachi Mehta, CEO, OxWorks

What change(s) does this PR introduce?
Updates subscription table to match new ERD (subscription history)
Did you update the CHANGELOG?

  • Yes

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
    Anyone using this package with previous ERD will fail to build the subscription history table.

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

  • No

How did you test the PR changes?

  • Local (please provide additional testing details below)
    Set this up to run with newest fivetran package, synced April 6th 2022. I have the subscription history table with my company's live data, so I have the schemas to work with. I did some row count validation as well -- things seem good.

Screen Shot 2022-04-10 at 5 43 16 PM

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

:bruh:

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

@fivetran-joemarkiewicz
Copy link
Contributor

Hi @nachimehta thanks so much for opening this PR! 🙌

This was actually something I had on my radar as well. However, I was unable to test effectively with the updated connector that contains the history tables.

My only question with this PR is to understand the implications of the naming change. For other packages where we introduced history tables we actually had to account for the historical records. See how we did this within our Salesforce package where we actually filter out the inactive records within the _tmp models.

I will want to check with our product team to understand if these models introduce history mode. If they do, then we will want to filter out the inactive records via the _fivetran_active field. Otherwise, we can move forward with the PR as is! I hope to post back here shortly!

@fivetran-joemarkiewicz
Copy link
Contributor

@nachimehta would you actually be able to confirm if the Stripe data you are working with in fact does have a _fivetran_active field within the subscription_history source table?

@fivetran-joemarkiewicz fivetran-joemarkiewicz added bug Something isn't working enhancement New feature or request labels Apr 11, 2022
@nachimehta
Copy link
Author

@fivetran-joemarkiewicz confirmed:

Screen Shot 2022-04-11 at 11 04 54 AM

@fivetran-joemarkiewicz
Copy link
Contributor

@nachimehta thanks so much for confirming this!

A few things I want to adjust before merging this with our branch and cutting a new release. I am actually going to retain the naming of the models to be subscription vs subscription_history because I will plan to filter out the inactive records within the model. Thus the model will not have historical data by default. I will still reference the historical table, but I feel it would be more confusing to name the model historical if it is in fact not. Finally, I am going to mark this as a breaking change since this is a pretty significant update to the package.

With that, I am going to merge this PR with a working branch I will have on our end so we may do further integration testing. It would be great if you could continue to follow the next PR as there will be a possibility for you to test out the changes before we merge and release the next update.

Thanks again so much for your contributions 🏅. The same commentary here will apply to the accompanying PR you opened on our dbt_stripe package.

@fivetran-joemarkiewicz fivetran-joemarkiewicz changed the base branch from main to bugfix/nachimehta-subscription-history April 11, 2022 16:09
Copy link
Contributor

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

As stated in the above comment, I will be merging this into a working branch on our end to make a few small adjustments before merging.

Please feel free to follow the accompanying PR to stay updated on my changes and test them if you would like.

Thanks!

@fivetran-joemarkiewicz fivetran-joemarkiewicz merged commit 10bff82 into fivetran:bugfix/nachimehta-subscription-history Apr 11, 2022
@fivetran-joemarkiewicz
Copy link
Contributor

@nachimehta I have been able to update the branches to account for all of these changes. Would you be able to test the following branch in your packages.yml and let me know if you see the same success?

packages:
  - git: https://github.com/fivetran/dbt_stripe.git
    revision: bugfix/nachimehta-subscription-history
    warn-unpinned: false

FYI This includes your changes from both the source and transform version of the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants