How can we enrich the deduplicated event stream with customer metadata using a broadcast hash join?
broadcast(df_customers) eliminates cluster shuffle overhead when attaching dimension attributes.
High-performance dimensional enrichment in production analytics pipelines.
df_enriched = df_deduped.join(broadcast(df_customers.select("user_id", "tier", "region")), "user_id", "left")Practice typing production-grade PySpark code for Capstone Part 4: Dimension Enrichment via Broadcast Join.