airbytehq / airbyte

The leading data integration platform for ETL / ELT data pipelines from APIs, databases & files to data warehouses, data lakes & data lakehouses. Both self-hosted and Cloud-hosted.
https://airbyte.com
Other
15.22k stars 3.92k forks source link

Source Stripe: Disounts not expanded for Invoice Line Items #29162

Open dis-sid opened 1 year ago

dis-sid commented 1 year ago

Connector Name

source-stripe

Connector Version

3.17.2

What step the error happened?

During the sync

Revelant information

We get expanded invoice level discounts but not for invoice line items. As a result we can analyze invoice coupons but not item coupons, we just get a discount id that we can't join we anything else to retrieve which coupon or promo code has been used.

The relevant field in the stripe API is 'discounts' and it is found in each invoice line items. it should be an array of discount object when expanded and an array of discount id when it is not.

My understanding is that the parameter expand[]=discounts should be added somewhere in https://github.com/airbytehq/airbyte/blob/master/airbyte-integrations/connectors/source-stripe/source_stripe/streams.py

I can submit a PR if needed.

Relevant log output

No response

Contribute

davydov-d commented 9 months ago

note: in version 2022-11-15 of the Stripe API which we are using, this field is not expanded by default.

We don't have it expanded neither in response, nor in the schema. Therefore it's more a feature request