Define a bounded incremental batch
How watermarks and AWS Glue job bookmarks define incremental batches, preserve progress after successful target writes, and support safe retries and reprocessing without gaps or duplicates. · associate
Incremental loading processes changes since saved progress, rather than the whole source. After an initial baseline load, a pipeline can use a watermark as its last successfully processed boundary. For each run, retain that lower boundary, L, and capture a fixed upper boundary, U. Read changes satisfying L < change_position <= U; changes beyond U belong to a later batch.
Choose a position that identifies the changes you need. An increasing row ID finds inserts, but not updates to older rows or hard deletes. A reliable modification timestamp can find inserts and updates; deletions need a separate signal, such as a tombstone or change log. If pagination can split records sharing a timestamp, use a compound cursor, such as timestamp plus unique ID.
A fixed boundary does not solve late visibility: a transaction can appear after extraction has passed its timestamp. Depending on the source, use a safety delay, an overlapping window with deduplication, or a reliable change log. The extraction rule must match the source's behavior before the watermark can represent complete progress.