Lessons
Units
-
Introduction to Batch Processing
Define batch processing, contrast it with streaming, and see where Spark fits among batch tools.
-
Introduction to Spark
Explain what Spark is, which languages it supports, and when to use it instead of SQL on a data lake.
-
Installing Spark
Install Java and Spark on a Linux machine, then run spark-shell and PySpark with a local SparkSession.
-
First Look at Spark/PySpark
Read a large CSV with an explicit schema, repartition it, and write it as parquet while watching the Spark UI.
-
Spark DataFrames
Work with Spark DataFrames, including parquet schemas, select and filter, lazy transformations versus actions, and UDFs.
-
Preparing Yellow and Green Taxi Data
Prepare yellow and green taxi CSVs for 2020 and 2021 by downloading them and rewriting them as typed parquet.
-
SQL with Spark
Combine green and yellow taxi data in Spark, register it as a temp table, and run the revenue report in Spark SQL.
-
Anatomy of a Spark Cluster
Describe the parts of a Spark cluster, including the driver, master, and executors, and why HDFS became less common.
-
GroupBy in Spark
Trace how Spark executes a GROUP BY in two stages, with a per-partition aggregate and a reshuffle by key.
-
Joins in Spark
Compare sort merge joins for two large tables with broadcast joins for a large table and a small lookup table.
-
Operations on Spark RDDs
Rebuild the green revenue query with RDD filter, map, and reduceByKey, then convert the result back to a DataFrame.
-
Spark RDD mapPartition
Use mapPartitions to apply a model to each partition of a taxi dataset as a pandas DataFrame.
-
Connecting to Google Cloud Storage
Upload taxi parquet files to Google Cloud Storage and configure a local Spark session to read from the bucket.
-
Creating a Local Spark Cluster
Run a standalone Spark cluster with a master and worker, convert the notebook to a script, and submit it with spark-submit.
-
Setting up a Dataproc Cluster
Create a Dataproc cluster and submit the Spark job from the web UI and with gcloud, after granting the needed role.
-
Connecting Spark to BigQuery
Write Spark job output directly to a BigQuery table using the BigQuery connector and a temporary GCS bucket.
Homework
Module 6 Homework [DRAFT]
Closed1 question · 2027 cohort · closed Mar 1, 2027
Recordings, code and notes
- Community notes
- Notes by Alvaro Navas Sandy's DE Learning Blog Notes by Alain Boisvert Alternative : Using docker-compose to launch spark by rafik Marcos Torregrosa's blog (spanish) Notes by Victor Padilha Notes by Oscar Garcia Notes by HongWei 2024 videos transcript 2025 Notes by Manuel Guerra 2025 Notes by Gabi Fonseca 2025 Notes on Installing Spark on MacOS (with Anaconda + brew) by Gabi Fonseca 2025 Notes by Daniel Lachner 2026 Notes by Ajay Katte 2026 Video PySpark installation on Windows (no pip install) by khanh