Lesson · 7 pages · about 6 min
Batch processing
A batch job works through a closed pile of data, such as yesterday’s orders, in one run. Split it into partitions so workers run side by side, retry only the one that fails, and publish every output at once so nobody sees half a day.
- What it is
- A batch job processes a fixed, finished set of data in one run, for example all of yesterday’s orders, and writes a result such as a sales table.
- What it is for
- Most reports, bills and machine-learning tables are built from whole days or months at a time. Batch is the simplest, cheapest way to compute them.
- Use it when
- When the readers can wait for the result, usually hours, and the input is known when the run starts.
- Not when
- When people need numbers within seconds or minutes of events: use stream processing.
Words you’ll learn
- Batch job
- Row
- Driver
- Partition
- Worker
- Spark
- Backfill
- Idempotent
- Retry
- Staging area