Working example needed for developer-triggered state bookmark finalization (unsorted streams)

State markers are by default marked as non-resumable if a stream's output is unsorted (or sorted in reverse).

In theory, the developer can control for this by running smaller loops through the data that are resumable at specific checkpoints.

For example, if an API can only return records in reverse sorted order, a developer could write a loop that iterates on time periods in ascending order. Taking for example a monthly time period, a developer could force the API to only retrieve records one month at a time, and loop through months until today's date. In this scenario, the bookmark is resumable exactly in between each month's loop, aka the stream is resumable after each month's data is fully collected.

We don't have code samples for this as of yet but in theory it should be addressable with some small adaptations to default behaviors.

Call for contributors

If anyone has samples - working or not working - these examples could be helpful towards us developing a guidance for developers, including sample code snippets to address the use case.