Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect version of invoice recorded in invoices table. #13

Open
benw-at-birdie opened this issue May 12, 2022 · 1 comment
Open

Incorrect version of invoice recorded in invoices table. #13

benw-at-birdie opened this issue May 12, 2022 · 1 comment

Comments

@benw-at-birdie
Copy link

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

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

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.

@benw-at-birdie
Copy link
Author

HI @sehnem @hsyyid is this ☝️ an issue you've come across at all?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant