Hello ๐ . First of all thank you for making a chargebee connector which is compatible with meltano. So much easier to implement!
Unfortunately I've run into an issue where the version of an invoice downloaded by the tap is out of date. The downloaded version is flagged as deleted whereas the latest version is not. This is causing a small discrepancy in our financial reporting but worries me that there are more examples which I'm not aware of.
The good news is that the latest version of the invoices is recorded in the events
stream. The following query returns all the versions including the latest...
select
content:invoice:id::text as invoice_id,
content:invoice:deleted::boolean as deleted,
content:invoice:updated_at::text as updated_at,
content:invoice:resource_version::text as resource_version
from analytics.chargebee.events where content:invoice:id::text = 'A100'
order by updated_at;
![image](https://user-images.githubusercontent.com/55486471/168043519-3b158035-0823-484c-ad7f-9eee470db32a.png)
But querying the invoices
table returns an earlier version (row 2 in the table above)...
select
id as invoice_id,
deleted,
updated_at,
resource_version
from analytics.chargebee.invoices
where id = 'A100';
![image](https://user-images.githubusercontent.com/55486471/168044162-f59f723c-b845-4228-80bf-6be2bdcfbb0e.png)
I initially assummed this was a problem with the incremental load for the invoices
table but running a --full-refresh
using meltano didn't work and even creating a new destination schema and setting a new job id --job_id=chargebee-to-snowflake-test
also returned the out of date invoice data :-(.
Interestingly running a load using the original https://github.com/singer-io/tap-chargebee/ tap downloads the correct version. Also querying the chargebee api directly using curl https://birdie-care.chargebee.com/api/v1/invoices/A100 -u ..
returns the latest version of the invoice.
Many thanks in advance for your help with this. Please let me know if there's any additional info I can provide to help debug.
p.s. we're using V2 of the chargebee product catalogue.