Data Ingestion and Transformation

An AWS Glue Spark join stalls because one task spills heavily to disk; 70% of input rows share one join key, and adding workers has not helped. Both datasets exceed safe broadcast memory limits. Which change BEST addresses the bottleneck while preserving join results?

Show the answer

Correct answerA. Salt the hot key and replicate its matching lookup rows.

AWhy this is right: Salting spreads hot-key rows across partitions, while matching lookup-row replication preserves the join results.

BWhy not this: Additional workers do not divide a single hot-key partition, so the straggling task remains the bottleneck.

CWhy not this: The lookup dataset exceeds safe broadcast memory limits, and shuffle partition counts do not reduce broadcast size.

DWhy not this: Partitioning by the unchanged key keeps all rows for that key together and preserves the skew.

Salting distributes a disproportionately frequent key across multiple partitions; replicating its matching lookup rows preserves the join matches. Repartitioning by the unchanged key still sends its rows to the same partition.