fivetran / dbt_recurly

Fivetran data transformations for Recurly built using dbt.
https://fivetran.github.io/dbt_recurly/
Apache License 2.0
4 stars 2 forks source link

[Bug] Test error on balance transactions #17

Closed benigls closed 1 year ago

benigls commented 1 year ago

Is there an existing issue for this?

Describe the issue

I encountered a test error in the recurly__balance_transactions model about duplicate balance_transaction_id. See the log below

07:47:04  Failure in test unique_recurly__balance_transactions_balance_transaction_id (models/recurly.yml)
07:47:04    Got 1644 results, configured to fail if != 0
07:47:04  
07:47:04    compiled Code at target/compiled/recurly/models/recurly.yml/unique_recurly__balance_transactions_balance_transaction_id.sql

Looking at one of the accounts in our recurly dashboard, I see that they have multiple failed transactions, see the photo below

image 3

The failed transaction also appeared in the raw dataset inside the transaction table

-- query
select invoice_id, payment_method_card_type, created_at, status_code from raw.recurly.transaction where invoice_id = '...'
image 4

I believe that the multiple failed transactions are causing the test failures because the transaction table is included in the recurly__balance_transactions model.

Relevant error log or model output

No response

Expected behavior

The package would handle multiple failed transactions with no test error.

dbt Project configurations

recurly_database: raw recurly_schema: recurly

recurly__using_credit_payment_history: false

Package versions

What database are you using dbt with?

bigquery

dbt Version

1.4.3

Additional Context

No response

Are you willing to open a PR to help address this issue?

fivetran-avinash commented 1 year ago

Thanks for bringing this to our attention @benigls! This is the same issue that @dylanwatt was reporting on, but this is the repo where we'll be submitting the PR, so thanks for creating it here. We plan on making this fix by at least the coming sprint.

fivetran-avinash commented 1 year ago

Hi @benigls, we've deploye test fixes to our packages in our latest releases to dbt_recurly. Try it out and let us know what you think!