Open bramrodenburg opened 1 week ago
@bramrodenburg thanks for opening this issue and raising the multiple disputes possibility to our attention! I was not previously aware of this possibility and I can see how having multiple disputes with the current logic results in data validation test failures.
This is something we would like to consider folding into our package logic to account for these rare scenarios. I see you opened a PR 🎉! We really appreciate you being willing to contribute your code updates to the broader package for everyone. I will plan to move our conversation to the PR and will review the PR in more detail this week.
Thanks again!
Is there an existing issue for this?
Describe the issue
The balance transaction model assumes that a transaction can only have 1 dispute. This is not correct and leads to failing data tests due to a left join of the balance_transaction model with the disputes model.
Relevant error log or model output
Expected behavior
The tests don't fail and multiple disputes are properly handled within the balance_transactions model.
Possible solution
dispute_ids
anddispute reasons
in an array within the balance_transactions table.dbt Project configurations
n/a
Package versions
v0.14.0 dbt_stripe v0.12.0 dbt_stripe_source
What database are you using dbt with?
bigquery
How are you running this dbt package?
dbt Core™, dbt Cloud™
dbt Version
Core:
latest: 1.8.6 - Update available!
Your version of dbt-core is out of date! You can find instructions for upgrading here: https://docs.getdbt.com/docs/installation
Plugins:
bigquery: 1.8.1 - Update available!
At least one plugin is out of date or incompatible with dbt-core. You can find instructions for upgrading here: https://docs.getdbt.com/docs/installation
Additional Context
See Stripe docs here: https://support.stripe.com/questions/receiving-multiple-disputes-per-payment-faq
Are you willing to open a PR to help address this issue?