You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
15:14:14 Completed with 1 error and 0 warnings:
15:14:14
15:14:14 Failure intest dbt_utils_unique_combination_of_columns_stripe__balance_transactions_balance_transaction_id__source_relation (models/stripe.yml)
Expected behavior
The tests don't fail and multiple disputes are properly handled within the balance_transactions model.
Possible solution
Aggregate the dispute_ids and dispute reasons in an array within the balance_transactions table.
bramrodenburg
changed the title
[Bug] Cannot handle balance transactions with multiple disputs
[Bug] Cannot handle balance transactions with multiple disputes
Sep 9, 2024
bramrodenburg
changed the title
[Bug] Cannot handle balance transactions with multiple disputes
[Bug] balance_transactions test fail due to transactions with multiple disputes
Sep 9, 2024
@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.
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:
Your version of dbt-core is out of date!
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
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?
The text was updated successfully, but these errors were encountered: