When a dataset grows past what pandas or a single database can handle comfortably, Apache Spark spreads the work across a cluster. Spark 4 brought ANSI SQL mode by default, Spark Connect and a faster Python API, and it remains the engine behind Databricks, AWS EMR and Google Dataproc. This course teaches you to write PySpark that is correct first and fast second, and to understand what the cluster is actually doing.
What you'll learn
- Spark's architecture: driver, executors, jobs, stages and tasks
- Lazy evaluation, transformations and actions, and reading the query plan with
explain() - The DataFrame API and Spark SQL, and when to use each
- Reading and writing Parquet, JSON and CSV at scale, and schema handling
- Partitioning, shuffles and why some operations are expensive
- Joins at scale: broadcast, sort-merge and dealing with skewed keys
- User-defined functions, Arrow-backed pandas UDFs and the Python data source API
- Lakehouse table formats: Delta Lake and Apache Iceberg, with ACID writes and time travel
- Structured Streaming: sources, sinks, watermarks and exactly-once output
- Tuning with the Spark UI: adaptive query execution, caching, memory and file sizes
Who it's for
- Data engineers moving from single-machine tools to distributed processing
- Python developers joining a team that runs Databricks, EMR or Dataproc
- Analysts whose SQL workloads have outgrown their warehouse budget or time limits
Prerequisites
- Solid Python and SQL
- Experience with pandas or a similar DataFrame library (see Data Analysis with Python and pandas)
- Docker installed, for running Spark locally
Outcomes
By the end of this course you will be able to:
- Write PySpark jobs that read, transform and write large datasets reliably.
- Read a query plan and the Spark UI to find the cause of a slow job.
- Choose partitioning, join strategies and file layouts that keep shuffles small.
- Build batch and streaming pipelines on Delta Lake or Iceberg tables.
Projects you'll build
- Clickstream batch pipeline – process several gigabytes of web event logs into daily session and funnel tables, practising partitioning, window functions and Parquet output.
- Skewed join fix – take a deliberately slow job joining orders to a handful of very large customers and make it fast, practising broadcast joins, salting and AQE settings.
- Streaming order aggregator – read events from a Kafka topic and maintain per-minute revenue in a Delta table, practising Structured Streaming, watermarks and checkpoints.
Tools you'll use
Apache Spark 4.x with PySpark, Docker, Jupyter, Delta Lake and Apache Iceberg, the Spark UI, and a short look at Databricks Free Edition.
Course outline
| Module | Topic |
|---|---|
| 1 | Why distributed processing, and Spark's architecture |
| 2 | Running Spark locally and with Spark Connect |
| 3 | DataFrames, transformations and actions |
| 4 | Spark SQL and the Catalyst optimiser |
| 5 | File formats, schemas and partitioned data |
| 6 | Shuffles, partitioning and joins |
| 7 | UDFs, pandas UDFs and Python data sources |
| 8 | Delta Lake and Apache Iceberg |
| 9 | Structured Streaming |
| 10 | Performance tuning with the Spark UI |
| 11 | Deploying on Databricks, EMR or Dataproc |
| 12 | Project: an end-to-end lakehouse pipeline |
FAQ
How does this relate to the Data Engineering Pipelines course?
Data Engineering Pipelines covers the wider workflow: ingestion, dbt models in a warehouse, orchestration with Airflow and data quality. This course goes deep on one engine, Spark, for workloads too large or too custom for warehouse SQL.
Do I need a cloud account?
No. Everything runs locally in Docker. We show how the same code deploys to managed services so you can choose later.
Should I use Scala instead of Python?
PySpark is now the most common way teams use Spark, and with DataFrames the performance gap is small. We mention Scala only where it still matters.
How do I join?
Get in touch and we'll share the current format, schedule and enrolment details.