Hi. I'm working on a tap for Chargify data. Lookin...
# singer-tap-development
d
Hi. I'm working on a tap for Chargify data. Looking for some tips to debug it. It's looping through pages of data and sending a data and state message after each request. The main thing it's reading is the events data from this endpoint. It's using the event id as the state. I ran it and it hit a timeout on my batch job. The next time it ran, I found that the id in its state was much lower than the last state written to my warehouse (Redshift). I'd like to know how Meltano handles state during a run (using Postgres state backend). I've noticed that the "run" table seems to have state values populated when taps complete. Does it store state during a run? Can it recover from this? Any documentation on this subject I can look at? BTW I'm writing this in TypeScript, in case that's relevant.
r
👍 1
d
Thanks. That's helpful.
If I'm reading this right, the target decides when to store partial state, and it does this by sending Meltano a message?
e
Correct. Meltano reads the target's stdout for STATE message, which according to the spec the target is supposed to emit after it commits data to the dest system