Intermediatecomparison Verified ~7 min
What is a broadcast variable in Spark, and how is it different from a broadcast join?
Source: Spark cluster mode overview
Quick answerFree
A broadcast variable (sc.broadcast(value)) sends a read-only value, such as a lookup dictionary, to each executor once and keeps it there, instead of shipping it inside every task. A broadcast join is a SQL join strategy that copies a small DataFrame to every executor so the large side is not shuffled.
Detailed answer· ~310 words
Interview PrepUnlock the full answer with Interview Prep
Get a ~310-word model answer, 5 key points, a visual explainer, 5 common mistakes and 5 follow-ups, plus 43 more Apache Spark questions.
Also in Pro (₹499 / 90 days).
Key points· 5 points
Interview PrepUnlock with Interview Prep
Visual explainer· animated, step by step
Interview PrepUnlock with Interview Prep
Common mistakes· 5
Interview PrepLocked
Best practices· 4
Interview PrepLocked
Likely follow-ups· 5 questions
Interview PrepUnlock with Interview Prep
+ 43 more Apache Spark questions in Interview Prep, each with the full answer.