prratek_ramchandani
12/17/2021, 4:58 PMlist
endpoints return data reverse-sorted by my replication key with no option to customize that behavior as far as i can tellaaronsteers
12/17/2021, 5:19 PMprratek_ramchandani
12/17/2021, 5:53 PMaaronsteers
12/17/2021, 6:29 PMaaronsteers
12/17/2021, 6:30 PMprratek_ramchandani
12/17/2021, 7:08 PMaaronsteers
12/17/2021, 7:24 PMprratek_ramchandani
12/17/2021, 7:26 PMprratek_ramchandani
12/21/2021, 2:19 AMself.finalize_state_progress_markers()
after each iteration of the outer loop. however, a stream was interrupted after getting through a solid year’s worth of data and when the next run started the state emitted showed it starting back at the start date.
any idea what i might be doing wrong? i know the pagination through dates itself is working because i can see logs from the Stripe client library i’m using that show the replication key filters changing as expected every so often.prratek_ramchandani
02/28/2022, 2:48 PMfinalize_state_progress_markers()
at the end of each iteration. i logged self.stream_state
at the end of an iteration to confirm it was working and i do see the state i pushed
{'starting_replication_value': '2022-01-01T00:00:00Z', 'progress_markers': {'Note': 'Progress is not resumable if interrupted.', 'replication_key': 'created', 'replication_key_value': 1641237037}}
however, the next run starts right back at the beginning if that stream doesn't run to completion and starts with a [warning ] No state was found, complete import.
the repo is here if that helps. without this working my first run would take a couple of days 😬dan_ladd
04/20/2022, 6:49 AMprratek_ramchandani
04/20/2022, 1:27 PMdan_ladd
04/20/2022, 1:33 PMmerge_state_messages
since the default target behavior did some merging behavior with state. Wasn't sure if that was impacting what you are seeingprratek_ramchandani
04/20/2022, 1:34 PMmerge_state_messages
and see if that helpsdan_ladd
04/20/2022, 1:35 PMaaronsteers
04/21/2022, 12:08 AMhowever, the next run starts right back at the beginning if that stream doesn't run to completionFor referse-sorted streams, they wouldn't be resumable until after a given stream completes its iteration. What you could do to mitigate would be to wrap in a timeblock that can still be ascending and then finalize the state market after the stream is caught up at least to that checkpoint.
aaronsteers
04/21/2022, 12:14 AM