singer-io / tap-chargebee

Singer.io tap for extracting data from the Chargebee API
https://www.singer.io/
GNU Affero General Public License v3.0
7 stars 32 forks source link

draft invoices persist in synced data warehouse, despite being published #84

Open GeorgeTouros opened 2 years ago

GeorgeTouros commented 2 years ago

Chargebee invoices can be generated as drafts. In this case, their id is something like 'draftinv*' and they remain in that state until the invoice is published and sent to the customer. We have noticed that there are cases where our 'invoices' table maintains the draft invoice, even after the proper invoice has been published and paid. We would expect that the draft id would at least have a "deleted"=True flag, but that's not the case. So far we had been ignoring draft invoices for calculations, but now we want to create an operational check for invoices that are stuck in draft state, and that's how we noticed it. We are using chargebee v1 catalog, with Stitch on a BigQuery project.