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.
Question breakdown
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
- Compare the sizes: A is 128 GB and B is 1 GB, so only B is a realistic broadcast candidate.
- Broadcasting copies the whole table to the driver and to every executor, so the broadcast side must fit in memory.
- Once each executor holds B, it joins its local partitions of A directly.
- The benefit is that the 128 GB side is never shuffled, which is what option B states.
Each option
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.
Official documentation: Hints (Databricks SQL)
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.
More questions
Other CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK-3-5-QUESTIONS practice questions
- Question 2A Spark DataFrame df is cached using the MEMORY_AND_DISK storage level, but the DataFrame…
- Question 344 of 55. A data engineer is working on a real-time analytics pipeline using Spark Struct…
- Question 7A developer wants to test Spark Connect with an existing Spark application. What are the …
- Question 8A data engineer is running a Spark job to process a dataset of 1 TB stored in distributed…
- Question 10A data engineer is building a Structured Streaming pipeline and wants the pipeline to rec…
- Question 11Given a DataFrame df that has 10 partitions, after running the code: result = df.coalesce…
