Batch Processing with Spark
Process datasets larger than one machine with PySpark DataFrames and Spark SQL, and tune jobs using the physical plan and the Spark UI.
4 objectives 6 steps about 145 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Explain Spark's driver and executor model, how a cluster manager (standalone, YARN or Kubernetes) provides executors, lazy transformations versus actions, and how a job splits into stages and tasks at shuffle boundaries.
- Write PySpark DataFrame and Spark SQL code that reads Parquet or table-format data, joins and aggregates it, and writes partitioned output.
- Diagnose data skew, excess shuffles and spills in the Spark UI and fix them with broadcast joins, repartitioning, adaptive query execution or caching where justified.
- Unit-test PySpark transformation functions on small local DataFrames.
Lesson plan
6 steps, about 145 min · 5 of 5 lessons available so far
- From Clusters to Stages: How Spark Runs Your Code Concept · 25 min
- Lab: Read, Transform and Write with DataFrames Lab · 30 min
- Joins and Aggregations at Scale, Shuffle by Shuffle Worked example · 25 min
- Lab: Using the Spark UI to Fix a Slow Job Lab · 30 min
- Testing PySpark Transformations Locally Lab · 20 min
- Check: Plans, Shuffles and Tuning Knowledge check · 8 questions
Practise it
Write a PySpark job that joins a year of trip records with a zone lookup, computes daily metrics per zone and writes partitioned Parquet; include pytest tests for each transformation function and a short note showing one tuning change (for example a broadcast join) and its measured effect in the Spark UI.
References
Hard prerequisites
Unlocks
Nothing depends on this skill yet.
On these roadmaps
Progress and evidence for this skill are shared across all of them.