DataEng Hub

Topic

Spark SQL

SQL on Spark — window functions, MERGE, query plans and optimizer behaviour.

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.

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

ProblemSilver

Build an SCD Type 2 with MERGE

Apply a day's customer address changes to a dimension table, closing old versions and inserting new ones, in a single MERGE.

ProblemBronze

Deduplicate a raw events table

Keep exactly one row per event_id — the latest by timestamp — from a bronze table that receives replays and retries.

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.

Video

Learning path

Learning path~8 h · 9 steps

Databricks Data Engineer Associate prep

The governance, Delta Lake and SQL topics the Databricks Data Engineer Associate exam leans on, with practice problems for each.