CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice question 1 of 25

You have: DataFrame A: 128 GB of transactions DataFrame B: 1 GB user lookup table Which strategy is correct for broadcasting?

Choose your answer, then check it against the explanation and the full breakdown below.

You have: DataFrame A: 128 GB of transactions DataFrame B: 1 GB user lookup table Which strategy is correct for broadcasting?
Answer options
Question 1 of 25

Question breakdown

Tests
Choose the correct side of a join to broadcast
Difficulty
Easy

Key idea: A broadcast hash join ships the small table to every executor, so the large table can be joined in place without being shuffled.

How to reach the answer

  1. Compare the sizes: A is 128 GB and B is 1 GB, so only B is a realistic broadcast candidate.
  2. Broadcasting copies the whole table to the driver and to every executor, so the broadcast side must fit in memory.
  3. Once each executor holds B, it joins its local partitions of A directly.
  4. The benefit is that the 128 GB side is never shuffled, which is what option B states.

Each option

  • AIncorrect. It picks the right table but gives the wrong reason; the main gain is that the large DataFrame A is not shuffled, not anything about B itself.
  • BCorrect. Broadcasting the 1 GB lookup table lets each executor join its local partitions of the 128 GB table, so the large side is never shuffled.
  • CIncorrect. Broadcasting 128 GB would overwhelm the driver and executor memory, and avoiding a shuffle of the small side gains almost nothing.
  • DIncorrect. DataFrame A is the larger table, not the smaller one, so the premise is false.

Common trap: Option A names the right table, so it is easy to accept without noticing that the stated benefit (B avoiding its own shuffle) is not the real reason broadcasting helps.

In practice: Fact-to-dimension joins are the classic case for broadcast(). Note that 1 GB is well above the default 10 MB spark.sql.autoBroadcastJoinThreshold, so you would normally need an explicit hint or a higher threshold, and you should confirm executors have the memory headroom.

Remember: Broadcast the small side so the big side never has to be shuffled.

Drafted with AI assistance and checked against the answer key.

Keep practicing

Take the free CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice test

Ten exam-style questions with answers and explanations, plus the exam facts and study guides.

Start the free practice test

More questions

Other CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice questions

Scroll to Top