fivetran / dbt_stripe_source

Fivetran's Stripe source dbt package
https://fivetran.github.io/dbt_stripe_source/
Apache License 2.0
8 stars 27 forks source link

[Bug] Uniqueness test on unique_invoice_line_item_id #73

Closed lsusie closed 4 months ago

lsusie commented 5 months ago

Is there an existing issue for this?

Describe the issue

An error in my Fivetran/Stripe package today with uniqueness in stg_stripe_invoice_line_items model. Seems to be testing for uniqueness on unique_invoice_line_item_id but I have a few records where it is not unique through the data source.

Relevant error log or model output

17:49:29 3 of 3 START test unique_stg_stripe__invoice_line_item_unique_invoice_line_item_id  [RUN]
17:49:30 3 of 3 FAIL 3 unique_stg_stripe__invoice_line_item_unique_invoice_line_item_id . [FAIL 3 in 1.09s]

Expected behavior

As this stg_stripe_invoice_line_items has 2 PK's I expect the unique_stg_stripe__invoice_line_item_unique_invoice_line_item_id to not exist.

dbt_utils_unique_combination_of_columns_stg_stripe__invoice_line_item_invoice_line_item_id__invoice_id__source_relation is already there to ensure the combo is unique

dbt Project configurations

  #### Variables for Fivetran/stripe package ####
  # stripe_database: database
  stripe_schema: source_ft_stripe 

  stripe__using_invoices:        True  #Disable if you are not using the invoice and invoice_line_item tables
  stripe__using_payment_method:  False  #Disable if you are not using the payment_method and payment_method_card tables
  stripe__using_subscriptions:   True  #Disable if you are not using the subscription and plan/price tables.
  stripe__using_credit_notes:    False   #Enable if you are using the credit note tables.

Package versions

  - package: fivetran/stripe
    version: [">=0.12.0", "<0.13.0"]

What database are you using dbt with?

bigquery

dbt Version

18:16:55 Running with dbt=1.6.11

Additional Context

Screenshot 2024-04-01 at 11 21 32 AM

I think you just need to remove this test?

unnamed (2)

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

fivetran-reneeli commented 5 months ago

Thanks @lsusie for creating this very detailed ticket! We'll look to add this fix in the coming weeks.

fivetran-reneeli commented 4 months ago

Hi @lsusie ! We've got the ball rolling and will work to get this released in the coming week. In the meantime, feel free to use the following branch with the update. You'll need adjust the packages.yml in your stripe package. Let me know if there are any issues!


  - git: https://github.com/fivetran/dbt_stripe.git
    revision: bugfix/invoice_line_item_uniqueness_test
    warn-unpinned: false
fivetran-reneeli commented 4 months ago

Thanks @lsusie for opening this! We've releasee this update and as such will close this issue out.

lsusie commented 4 months ago

@fivetran-reneeli Awesome! Thanks for all the work you and your team does!