So: you load a lot of data-based rows, the rows cannot be uniquely identified, the download can (and apparently will) be interrupted at any time at any time, and you want to be able to resume such an interrupted download from where you stopped, although for all practical purposes you cannot determine where you left off. Good.
Downloading to a table containing an additional identifier column will work, provided that , and whenever data loading starts, it always starts from the same element and loads the elements in the same order. Wildly inefficient, as you have to read every time you start it.
Another awkward option would be to first split the data you load into chunks of a manageable size (maybe 10,000,000 rows). Load them with a piece, keeping track of which piece you downloaded. Use the table of intermediate elements so that you know and can control when the piece is โfully processedโ. If / when interrupted, you only drop the piece you are working on when interrupted and resume working with this piece.
source share