Apache Spark
Process large volumes of data with PySpark on your own Docker cluster: DataFrames, Spark SQL, performance, streaming with Kafka, Delta Lake, Iceberg, MLlib and Spark in the cloud. 20 real labs.
Intermediate · 20 hours · 20 lessons · Course language: Spanish and English
A hands-on Apache Spark 4 course with PySpark. You install Docker on Windows, macOS or Linux and start your own Spark cluster with Docker Compose: a master, two workers and the History Server. You learn how Spark thinks (transformations, actions and lazy evaluation), the difference between RDDs and DataFrames, and you work with realistic data from a supermarket chain: you read and write CSV, JSON and Parquet, query with Spark SQL, join, aggregate and use window functions. You compare UDFs with built-in functions, clean dirty and nested data, and master performance: partitions, shuffles, caching, the Spark web UI, execution plans and Adaptive Query Execution (AQE). You process real-time data with Structured Streaming and Kafka, build a lakehouse with Delta Lake and Iceberg on S3 storage, train a model with MLlib and learn how Spark runs on Databricks, EMR, Dataproc and Kubernetes. You finish with a final project: a complete, verified bronze, silver and gold pipeline. Every command is explained and every result is real. The first 3 classes are free. The lessons, quizzes and videos are in English; the lab files keep their original Spanish names, and every lesson explains them.
What you will learn
- Start a Spark cluster with Docker Compose on Windows, macOS or Linux and submit jobs with spark-submit
- Understand transformations, actions and lazy evaluation, and when to use RDDs or DataFrames
- Read and write CSV, JSON and Parquet, query with Spark SQL, join, aggregate and use window functions
- Prefer built-in functions over UDFs and clean dirty and nested data
- Tune jobs with partitions, caching, the web UI, execution plans and AQE
- Process real-time data with Structured Streaming and Kafka, with windows and watermarks
- Build a lakehouse with Delta Lake and Iceberg on S3 storage and train models with MLlib
- Take your jobs to Databricks, EMR, Dataproc or Kubernetes
Skills
Apache Spark, PySpark, Spark SQL, DataFrames, Docker Compose, Parquet, Spark optimization, Structured Streaming, Apache Kafka, Delta Lake, Apache Iceberg, MLlib, Databricks, EMR and Dataproc
Program
Module 1: First steps (free classes)
Spark, your Docker environment on Windows, macOS and Linux, your cluster and lazy evaluation.
Project: A Spark cluster with two workers that processes the chain’s sales data.
- Spark and your Docker environment on Windows, macOS and Linux: What Spark is, how it works, and installing Docker on each system to run your first PySpark program.
- Your Spark cluster with Docker Compose: A master, two workers and the History Server: spark-submit, the web UIs and how the work is split.
- DataFrames, transformations, actions and lazy evaluation: The course data, transformations versus actions, the execution plan and RDDs versus DataFrames.
Module 2: Spark SQL and DataFrames
File formats, Spark SQL and the catalog, joins and aggregations.
Project: Sales reports by store and category, in Parquet and as SQL tables.
- Reading and writing CSV, JSON and Parquet: Schemas, read and write modes, corrupt records, partitioning and why Parquet is faster.
- Spark SQL, views and the table catalog: Temporary views, spark.sql, the spark-sql CLI, managed tables and the same plan for SQL and DataFrames.
- Joins and aggregations: Join types, broadcast versus sort-merge, groupBy, pivot, rollup and cube.
Module 3: Advanced transformations
Window functions, UDFs versus built-in functions, and dirty and nested data.
Project: Rankings, running totals and nested JSON events turned into a clean table.
- Window functions: Rankings per group, running totals, lag and lead, and moving averages.
- UDFs versus built-in functions: Python UDFs, pandas UDFs with Arrow and built-in functions: timings and plans compared.
- Dirty and nested data: Nulls, dates in several formats, Spark 4 ANSI mode, try_cast, nested JSON, structs and arrays.
Module 4: Performance
Partitions and shuffles, caching, the web UI and execution plans, and AQE.
Project: A slow job diagnosed and optimized with evidence from the web UI.
- Partitions and shuffles: How many partitions there are and why, repartition versus coalesce, the shuffle and how many files get written.
- Caching and persistence: cache, persist and their storage levels, when it pays off and when it doesn’t, and unpersist.
- The Spark web UI and execution plans: Jobs, stages and tasks, the History Server and its API, and how to read explain in its different modes.
- Adaptive Query Execution (AQE) and tuning: AQE coalesces partitions, switches join strategies and splits skewed data. Settings that really matter.
Module 5: Streaming
Structured Streaming: micro-batches, checkpoints, Kafka, windows and watermarks.
Project: Real-time sales per minute from Kafka, fault tolerant.
- Structured Streaming: micro-batches and checkpoints: A table that grows forever: sources, output modes, triggers, checkpoints and restarts without losing data.
- Streaming with Kafka: windows and watermarks: Kafka in Docker Compose, reading and writing topics, time windows, late data and watermarks.
Module 6: Lakehouse and machine learning
Delta Lake and Iceberg on S3, and models with MLlib.
Project: A lakehouse with version history and a model that predicts returns.
- Delta Lake on S3 storage: ACID tables on S3: UPDATE, DELETE, MERGE, history, time travel and schema enforcement.
- Apache Iceberg: Catalogs, hidden partitioning, snapshots, schema and partition evolution, and rollback.
- Machine learning with MLlib: Pipelines, transformers and estimators, a classifier, evaluation, validation and saving the model.
Module 7: Cloud and final project
Spark on Databricks, EMR, Dataproc and Kubernetes, and a complete pipeline.
Project: A bronze, silver and gold pipeline with Delta Lake, verified end to end.
- Spark in the cloud: Databricks, EMR, Dataproc and Kubernetes: How Spark runs on each platform, Spark Connect and the same job locally and on S3.
- Final project: a bronze, silver and gold pipeline: Ingestion, cleaning, data quality and aggregates with Delta Lake, idempotent and verified end to end.
Prerequisites
- A computer with Windows 10/11, macOS or Linux and 16 GB of RAM (the cluster uses about 6 GB)
- Docker Desktop (Windows or macOS) or Docker Engine (Linux): class 1 explains the installation on each system
- Basic Python (variables, functions and lists) and basic SQL (SELECT, WHERE and GROUP BY)
Next courses
- Apache Kafka · Intermediate · 20 hours
Design and run streaming platforms with Kafka 4 in KRaft mode: a 3-node cluster in Docker, Python producers and consumers, exactly-once, Schema Registry, Kafka Connect with Debezium, ksqlDB, security, monitoring and Kafka in the cloud. 20 verified labs. - Data Engineer - Big Data · Intermediate · 45 hours
Build end-to-end data pipelines with Apache Spark, Apache Kafka, Apache Flink, Apache Airflow and a Delta Lake lakehouse, all in Docker on Windows, macOS or Linux. 45 verified labs.