DataEng Hub

Topic

PySpark

DataFrame patterns, performance tuning and the Spark execution model from Python.

Articles

Article10 min read

Data Skew in Spark: Detect It and Fix It

Find the hot key behind a stage that never finishes, then fix it with AQE skew joins, key cleanup, hot-key isolation or salting, in that order.

Article7 min read

Testing PySpark Code with pytest

A test pyramid that actually fits a Spark pipeline — fast unit tests for transform logic, a shared local SparkSession, and a pattern for Delta-backed integration tests.

Learning

Learning1 min read

Why AQE coalesces shuffle partitions

Adaptive Query Execution merges tiny post-shuffle partitions at runtime, so stop hand-tuning spark.sql.shuffle.partitions for every job.

Problems

ProblemGold

Optimize a skewed three-way join

A fact-to-dimension join runs on one straggler task for 40 minutes. Diagnose the skew and fix it three different ways.