Watch a job travel from spark-submit to the driver, through stages, shuffles and executor memory — on a live ops dashboard with metrics, a topology and a driver log. Then go deep on PySpark, Spark SQL, tuning, and how PySpark runs on AWS Glue.
Each lesson is a job run you step through: the driver plans, executors light up, shuffles move data and the driver log records every message. Use ← → or press play.
Every concept comes with PySpark, Spark SQL or Glue script snippets — and the SQL playground runs your queries in the browser and shows the DataFrame twin.
Labs for stages, skew, joins, memory, Catalyst and Glue jobs and crawlers; a quiz per module and a searchable glossary. Progress stays in your browser.
glueContext = GlueContext(SparkContext.getOrCreate())
job = Job(glueContext); job.init(args["JOB_NAME"], args)
orders = glueContext.create_dynamic_frame.from_catalog(
database="raw", table_name="orders_json",
transformation_ctx="orders") # bookmark state
df = orders.toDF().where(F.col("status") != "test")
(df.groupBy("country").agg(F.sum("amount").alias("revenue"))
.write.mode("overwrite").parquet("s3://lake/curated/revenue/"))
job.commit()AWS Glue runs your PySpark on a serverless Spark cluster. Modules 05 and 06 follow the whole flow: crawlers fill the Data Catalog, a trigger starts the job, Glue provisions workers, GlueContext reads DynamicFrames, bookmarks remember what was processed and the job writes partitioned Parquet back to S3 for Athena.
Driver, executors and the cluster manager; how a job becomes stages and tasks; partitions, the shuffle and executor memory.
MapReduce paid a trip through disk for every job; Spark keeps data in memory and plans the whole pipeline as a DAG.
One driver, many executors and a cluster manager in between — follow a job from spark-submit to results.
Follow one action from the DAG to stages cut at shuffles to one task per partition — and find it in the Spark UI.
An RDD is partitions plus a recipe — how input splits form, how lineage rebuilds lost data, and why locality matters.
Map tasks sort and write blocks to local disk, reducers fetch them over the network — the costliest step in most jobs.
Inside an executor: heap regions, overhead and Python workers, cache levels, broadcast variables and accumulators.
How Python drives the JVM, the DataFrame API end to end, UDFs vs pandas UDFs, nested data and Structured Streaming.
Your Python code steers a JVM through Py4J — see when data stays in the JVM and when it crosses into Python.
Start a session, give your data a real schema, survive broken records and write Parquet without wiping the table.
Build column expressions, chain immutable transformations, and know exactly which call makes Spark do the work.
groupBy, every join type and window functions — the patterns behind most pipelines, and which of them shuffle.
Why a Python UDF is slow, when a built-in or a pandas UDF is the fix, and how Arrow moves data to pandas.
Structs, arrays, maps and JSON strings — query them in place, explode them safely and flatten them for the lake.
Treat a stream as a table that never ends: micro-batches, output modes, checkpoints, watermarks and foreachBatch.
SQL basics you run from PySpark — SELECT, GROUP BY, joins, windows and CTEs — and how Catalyst turns both into one plan.
Give a DataFrame a name, query it with SQL, and learn where Spark keeps tables, views and their metadata.
Pick columns, filter rows, sort and limit — in SQL and the DataFrame API — without tripping over NULL.
Count, sum and average per group, filter before and after aggregating — and see why every GROUP BY shuffles.
Inner, outer, semi, anti and cross joins on orders and customers — and the NULL and duplicate traps that skew totals.
Rank, compare and running-total rows without collapsing them — then structure long queries with CTEs and subqueries.
Follow one query from SQL text to generated code: parse, analyze, optimise, plan — and learn to read explain().
Read plans and the Spark UI, tune partitions, pick join strategies, beat skew, use AQE, lay out data and size executors.
A nightly job got 13× slower. Read the physical plan and the Spark UI to find out why before touching a config.
Too few partitions spill, too many drown in overhead, and a careless write leaves 98,000 tiny files behind.
A 40 MB lookup table is making Spark shuffle 2 TB of orders. Learn how Spark picks a join and how to overrule it.
One task runs for 38 minutes while 199 finish in seconds. Find the hot key and spread it out.
Spark plans with guesses. AQE re-plans at every shuffle with real sizes, and DPP skips partitions a join rules out.
The same query reads 3 TB of gzip CSV or 160 MB of partitioned Parquet. The difference is how the data is laid out.
A DataFrame recomputed three times, a slow Python UDF and one giant executor per node: three fixes for one job.
Serverless Spark on AWS: the Data Catalog, crawlers, what happens when a job runs, orchestration and security.
Catalog, crawlers, serverless Spark jobs and triggers — follow raw S3 files all the way to an Athena query.
One Hive-compatible metastore per account and Region: databases, tables and partitions every AWS engine shares.
How a crawler classifies files, groups folders into tables and partitions, and handles schema drift on every run.
From StartJobRun to SUCCEEDED: provisioning, driver and executors, worker types, logs, Spark UI and the bill.
Chain crawlers and jobs with triggers and workflows — or Step Functions, Airflow and EventBridge — and make reruns safe.
The job role, Lake Formation, VPC connections with ENIs and self-referencing security groups, secrets and encryption.
Write real Glue jobs: script anatomy, DynamicFrames, sources and sinks, job bookmarks, performance, streaming and the dev workflow.
Every Glue Spark job is the same skeleton: parameters, contexts, Job, extract–transform–load, commit.
Self-describing records, choice types and Glue transforms for messy data — and when to drop down to DataFrames.
S3, catalog and JDBC sources; partitioned Parquet sinks that update the catalog; DataFrame writes and Iceberg.
Let Glue remember what it already processed — and learn the five ways that memory goes wrong.
Read less, group small files, size workers to the work, keep the driver idle — and measure before you tune.
An always-on Spark Structured Streaming job: Kinesis or Kafka in, forEachBatch micro-batches out to S3.
Notebooks for exploring, pure functions and pytest for testing, IaC for deploying, data quality and alarms for running.
Explanations are our own summaries of the official Apache Spark and AWS Glue documentation; every lesson links to its source. Defaults and versions change — check the docs for your Spark and Glue version.