Give every batch a clear boundary
How to define bounded input batches and choose ingestion frequency and batch size to meet data freshness, completeness, and throughput requirements. · associate
A batch is a bounded set of inputs with a defined completion point. Define its membership before processing: an explicit file list called an input manifest, a consistent snapshot, or an extraction range. For time ranges, use one shared boundary convention, such as timestamp >= start AND timestamp < end, so adjacent ranges do not overlap.
A time boundary does not prove completeness. A record describing yesterday might arrive today. Define when inputs are ready, using an upstream completion signal or an agreed arrival allowance, and decide how later records are recovered through a correction run or backfill. Freeze the selected inputs rather than repeatedly reading a folder that is still changing.
Keep the same input selection available for retries. Process and validate those inputs, then publish results with idempotent writes: repeating the write must not duplicate business results. Advance the progress marker, which records successfully consumed input, only after successful publication. Otherwise, a failed run can cause the next run to skip unpublished data.