Batch Data Processing
Batch data processing runs computations on large, bounded datasets collected over a time window rather than processing records one at a time as they arrive. It powers ETL pipelines, periodic reports, model training, and any workload where latency of minutes to hours is acceptable.
itData engineering and analytics | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Batch Data Processing
Batch data processing is what happens when data is allowed to accumulate before a computer is asked to make a decision from it. The job picks a bounded slice, such as yesterday's orders, transforms it, and stops. That makes it less a conveyor belt than a sealed crate: you can count what went in, inspect what came out, and notice if someone left the lid off.
Logical time is the label on that crate. It says which interval the run represents, even when the scheduler starts the job later. A daily job that starts after midnight can still process the previous day. Use that interval in the input path, output destination, and checks. Otherwise a retry can quietly meet a different collection of records, which is a poor basis for confident arithmetic and an excellent basis for an unexplained Tuesday.
Idempotency is the promise that repeating the same declared work has the same intended effect. It does not require a supernatural guarantee that a worker only starts once. A worker can write output and lose contact before it reports success. The practical response is dull and useful: fixed input, deterministic logic, a replace-or-merge target, and publication only after validation. Dullness is underrated when totals are involved.
Shuffle is where records move between partitions so matching keys can meet. Grouping, wide joins, and global sorts often need it. The work may be spread across many workers, yet one unusually common key can leave a single straggler holding the finish line hostage. More workers do not divide that key by moral encouragement. Check partition sizes, shuffle volume, spill, and slow tasks before adding capacity.
A completed job is not automatically a useful result. Input may be incomplete, a schema may have changed, or totals may fail to reconcile. The course material calls this publication: make output visible only once execution and data checks both pass. Backfills obey the same rule, but over historical intervals, so they need a fixed code version, controlled concurrency, and a plan for existing outputs.
Read the Intro when you need the full flow from trigger to publication. Use the Cheatsheet while designing the run contract, retry behavior, partitioning, and acceptance checks. Field Notes carries the operational traps that emerge once the graph grows. The Quiz is where the terms stop being decorative labels and start refusing to sit in the wrong box.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://beam.apache.org/documentation/basics/
Supports
- Bounded data has a known fixed extent and can be processed by a batch pipeline
- Unbounded data grows over time and requires streaming processing
- Bounded and unbounded collections can coexist in a unified processing model
- https://beam.apache.org/documentation/programming-guide/
Supports
- Pipelines contain inputs, transforms, outputs, and execution options
- Distributed collections represent bounded or unbounded data
- Grouping and aggregation operate by key and window
- Batch sources such as files and databases create bounded collections
- https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/big-data
Supports
- Batch architectures combine data sources, distributed storage, processing, analytical stores, and analysis
- Batch data commonly enters scalable file or object storage before processing
- Orchestration coordinates processing activities and dependencies
- https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dags.html
Supports
- A directed acyclic graph describes tasks, dependencies, schedule, and operational controls
- Each run is a distinct instance with a defined data interval
- Orchestration concerns task order, retry, timeouts, and execution state
- https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/dag-run.html
Supports
- A scheduled run has a data interval representing the time range it processes
- A run normally begins after its associated interval ends
- Logical date represents the interval rather than actual wall-clock execution time
- Catchup and backfill create runs for historical intervals
- https://airflow.apache.org/docs/apache-airflow/2.10.2/best-practices.html
Supports
- Retried tasks should produce the same outcome on rerun
- Plain inserts can duplicate rows and upserts can avoid that outcome
- Tasks should read and write specific partitions instead of latest data
- Current-time calculations can make reruns produce different results
- Incomplete task output should not become the final result
- https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/backfill.html
Supports
- Backfills create runs for a specified historical date range
- Reprocessing behavior can target missing, failed, or completed runs
- Backfill controls include concurrency, ordering, and dry-run preview
- https://docs.cloud.google.com/dataflow/docs/guides/plan-pipelines
Supports
- Pipeline planning begins with measurable business, performance, reliability, source, sink, and security requirements
- Batch completion objectives can combine elapsed time, job status, and processed-element error measures
- Data correctness can be evaluated with unit, integration, and end-to-end tests
- https://docs.cloud.google.com/dataflow/docs/guides/develop-and-test-pipelines
Supports
- Pipeline testing includes unit, integration, and end-to-end scopes
- Isolated development, preproduction, and production environments support safer delivery
- Implementation choices affect production correctness and efficiency
- https://docs.cloud.google.com/dataflow/docs/guides/pipeline-best-practices
Supports
- Durable storage can share data between pipeline instances
- Batch pipelines can run on recurrent schedules
- Batching external calls reduces per-call overhead
- Partition keys and concurrency limits control parallel calls to external services
- https://docs.cloud.google.com/dataflow/docs/guides/large-pipeline-best-practices
Supports
- Small experiments can expose failure points, cost, and performance bottlenecks before a large run
- Dead-letter output can separate failed records when policy permits continued processing
- Durable intermediate results can reduce recomputation after expensive stages
- Intermediate materialization must be weighed against extra write cost
- https://spark.apache.org/docs/3.5.7/rdd-programming-guide.html
Supports
- Distributed data sets are divided into partitions and processed in parallel
- Shuffle redistributes data across partitions and involves disk, serialization, network, and coordination costs
- Lost persisted partitions can be recomputed from their transformations
- Partition count affects parallel execution
- https://spark.apache.org/history.html
Supports
- Apache Spark began as a UC Berkeley AMPLab research project in 2009 and was open sourced in early 2010
- Apache Spark moved to the Apache Software Foundation in 2013
- https://beam.apache.org/blog/first-release/
Supports
- Apache Beam 0.1.0-incubating was released on 2016-06-15 with runners for Apache Flink, Apache Spark, and Google Cloud Dataflow
- https://airflow.apache.org/docs/apache-airflow/1.10.4/project.html
Supports
- Apache Airflow started at Airbnb in October 2014 and was open source from its first commit
- https://docs.aws.amazon.com/glue/latest/dg/what-is-glue.html
Supports
- AWS Glue provides Apache Spark-based serverless ETL jobs and tools to create, run, and monitor data integration jobs
- https://aws.amazon.com/glue/pricing/
Supports
- AWS Glue charges for ETL job and crawler usage
- https://docs.cloud.google.com/dataflow/docs/overview
Supports
- Google Cloud Dataflow provides managed batch and stream data processing with workers that execute pipeline jobs
- https://cloud.google.com/dataflow/pricing
Supports
- Google Cloud Dataflow bills for resources used by batch and streaming jobs
- https://learn.microsoft.com/en-us/azure/batch/tutorial-run-python-batch-azure-data-factory
Supports
- Azure Data Factory can create and schedule a pipeline that runs an Azure Batch workload with explicit input and output storage
- https://www.asme.org/about-asme/engineering-history/landmarks/90-ibm-350-ramac-disk-file
Supports
- IBM introduced the 350 RAMAC disk file on 1956-09-04 as random-access storage for large computer data volumes
- https://www.ibm.com/history/system-360?mhq=System+360&mhsrc=ibmsearch_a
Supports
- IBM launched the compatible System/360 family on 1964-04-07
- https://www.ibm.com/history/information-management-system
Supports
- IBM announced Information Management System for mainframes in 1968
- https://research.ibm.com/publications/a-relational-model-of-data-for-large-shared-data-banks
Supports
- E. F. Codd published A Relational Model of Data for Large Shared Data Banks in June 1970
- https://research.google/pubs/mapreduce-simplified-data-processing-on-large-clusters/
Supports
- Google's 2004 MapReduce paper describes partitioning input data, scheduling work, handling failures, and inter-machine communication on large clusters
- https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.2/site/index.html?p=1507079
Supports
- Hadoop 0.1.0 was released on 2006-04-02 after the Nutch MapReduce and distributed-file-system code became a separate project
- https://apache.org/licenses/index.html
Supports
- Apache Software Foundation projects are licensed under Apache License 2.0
- https://docs.python.org/3/library/os.html#os.replace
Supports
- os.replace replaces a destination file and is atomic on POSIX when successful
- https://medium.com/airbnb-engineering/scaling-a-mature-data-pipeline-managing-overhead-f34835cbc866
Supports
- Scheduler, pre-execution, session startup, and allocation overhead can dominate a data pipeline
- Dependency graph depth increases orchestration overhead and task boundaries trade overhead against failure recovery
- https://medium.com/airbnb-engineering/druid-airbnb-data-platform-601c312f2a4c
Supports
- Airbnb kept re-ingested Druid segments inactive until activation to avoid mixing old and new versions during a backfill
- https://engineering.atspotify.com/2016/03/spotifys-event-delivery-the-road-to-the-cloud-part-iii
Supports
- Spotify handled events late for completed hourly buckets separately because readers generally consume each completed bucket once
- https://engineering.atspotify.com/2023/5/fleet-management-at-spotify-part-3-fleet-wide-refactoring
Supports
- Batch pipeline changes can have delayed feedback and can quietly corrupt data without causing process errors
