Closed jmussitsch closed 1 year ago
Hi @jmussitsch thanks so much for opening this bug report. I would completely agree with you that it seems the index
field was omitted from the staging model and the corresponding unique combination of columns test. It looks like this was missed on our end because our fee data only ever has a single index, which is why the test didn't fail on our end.
That being said, we should integrate this update into our package. I see you are open to creating a PR to address the issue. Are you still interested in contributing? If so there are a few changes we will want to apply:
index
exists in the get_fee_columns macro. It looks like it does, so we are good there!index
field to the stg_stripe__fee model. In particular within the final cte.index
field name and description to the src_stripe.yml for the fee source table.index
field name and description along with the update to the unique combination of columns test to the stg_stripe.yml for the fee staging model.After making those updates and confirming they work on your end, you should be good to open the PR and we can review and integrate into the next patch release! Otherwise, my team can tackle this bug fix in our upcoming sprint in two weeks time. Let me know if you have any questions!
@fivetran-joemarkiewicz thanks for getting back to me on this. I created a PR:
@jmussitsch thanks again for opening this issue and providing the fix! I am happy to say that this should now be live in the v0.9.2 version of the stripe_source package!
As such, I will close this issue. Please feel free to reopen if you notice the issue still persists.
@fivetran-joemarkiewicz thank you!
Is there an existing issue for this?
Describe the issue
The test
dbt_utils_unique_combination_of_columns_stg_stripe__fee_balance_transaction_id__source_relation
is defined as:However, the Fee table has an additional column
index
that is part of the composite primary key as described here:https://docs.google.com/presentation/d/1zyxgbaOjgBt3NsY0OfsiGsWDIefcBc-R1lHWlMltCYU/edit#slide=id.g14afa1361c6_3_0
So this test is giving false positives
Relevant error log or model output
No response
Expected behavior
The expected behavior would be for this test to not give false positives and include the index column as part of the unique column set.
dbt Project configurations
Package versions
What database are you using dbt with?
snowflake
dbt Version
Additional Context
No response
Are you willing to open a PR to help address this issue?