-
Notifications
You must be signed in to change notification settings - Fork 30
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
Config livemode #22
Config livemode #22
Conversation
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.
Your solution works great, but I think we need to gain more context from the customer in order to move forward with this PR. The customer responded to their Issue #19 saying they want to see their test customers next to live customers. I am suspicious to think that a test customer will not be tied to livemode
invoices, payments, charges, etc. If a test customer is also tied to other test objects then we will need to add this functionality to all other tables that allow the livemode
feature.
Our next steps for this enhancement would be to go back to the customer and ask if this solution is sufficient for their request, or if we will want to apply a blanket exclude_test
variable that allows users to enable or disable the livemode functionality across the entire package. We will then want to determine if the customer is intending for any of these changes to be replicated in downstream models. I just did a quick check and notice we have no is_livemode
fields so it would be impossible to determine in aggregates which records are test and which are not within the transform package.
introduce `using_livemode` variable through config
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.
Looks good! I just had one comment we should look into before release regarding the naming of livemode
within invoice_line_item
README.md
Outdated
@@ -71,7 +73,18 @@ models: | |||
|
|||
*Read more about using custom schemas in dbt [here](https://docs.getdbt.com/docs/building-a-dbt-project/building-models/using-custom-schemas).* | |||
|
|||
### Contributions ### | |||
### Running on Live vs Test Customers | |||
By default, this package will run on non-test data (`where livemode = true`) from the source Stripe tables. However, you may want to include and focus on test data when testing out the package or developing your analyses. To run on _only_ test data, add the following configuration to your `dbt_project.yml` file: |
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.
Did you intend for _only_
to have the underscores?
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.
i did at the time but maybe i should just remove...
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 I like it italicized, but let's remove the underscores.
@@ -2,3 +2,5 @@ | |||
|
|||
select * | |||
from {{ var('invoice_line_item') }} | |||
|
|||
{{ livemode_predicate() }} |
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.
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 pretty sure the ERD is incorrect -- we've been using livemode
in the columns macro
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 call! Looks good then!
What change(s) does this PR introduce?
Allows users to potentially include testing/non-live customer data (for testing purposes)
Does this PR introduce a breaking change?
Is this PR in response to a previously created Issue
How did you test the PR changes?
Select which warehouse(s) were used to test the PR
Provide an emoji that best describes your current mood
🚚
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.