03-01-2024 08:43 AM - edited 03-01-2024 08:52 AM
My Stripe connector produces an `invoice_line_item` table with unique ids corresponding to each invoice line item. However, these unique ids do not correspond to the actual `id`s (invoice line item ids) in the table.
Does anyone have experience with these unique ids and understand why they are different for a given line item from the id? How come they appear as "il_" (invoice line item) instead of "sli_" (subscription line item)? What is the difference between "sli" and "il" if unique id treats them as interchangeable?
Unique ids are "il" but all ids are "sli":
Unique ids are "il" and "sli" but all invoice ids are "sli":
Thanks in advance for your help.
03-04-2024 06:05 AM
Good day @pb-0
I am making some internal inquiries 🙂
Fivetran Community: for those familiar with Stripe, please share your experiences.
Cheers,
Toby
03-05-2024 08:53 AM
Hi @pb-0
Thanks for your question regarding the Stripe connector. I understand you have a query on the 'unique_id' and 'id' column; we've kept the design of this table like this because earlier Stripe API had 'unique_id' returning as well as 'id', and later as part of API upgrade to 2019-12-03, they've stopped sending the 'unique_id'. So, we assign 'id' to 'unique_id'. This field to be used for migrating internal references before upgrading to this version. For more information on this change, you can read this changelog.
Does this help answer your question?
03-06-2024 07:33 AM
Good day @pb-0
I hope that @dipenranpara 's reply is helpful; if you have additional questions, please let us know. If you are all set, would you please accept his reply as a solution; doing so makes it easy for all Community members to find the answers.
Cheers,
Toby
03-11-2024 08:53 AM
Hi @dipenranpara. Thanks for your reply.
The problem on my Fivetran table is 1) `unique_id` prefix does not match the prefix of any `id`s for the invoice - the screenshots show all line items in those invoices and `sli_` prefix represents a different kind of line item according to Stripe (i.e. Subscription line litem). Therefore, the unique ids of `il_` and `sli_` suggest different invoice line item types than what is in the invoice. 2) According to Stripe API update docs, all `id` should be prefixed with `il_`. However, the `id`s in my Fivetran table are prefixed with both `sli_` and `il_` (as are the unique ids). Shouldn't I only see `il_` prefix in my `id`s and `unique_id`s?
later as part of API upgrade to 2019-12-03, they've stopped sending the 'unique_id'. So, we assign 'id' to 'unique_id'. This field to be used for migrating internal references before upgrading to this version.
Can you talk more about how you "assign 'id' to 'unique_id'"?
I may be misunderstanding these internal references but my presumption based on the Stripe docs is all ids should be globally unique and prefixed with `il_`. I'd therefore expect all unique ids to be prefixed with `il_`.