BlackFriday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Databricks Exam Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Topic 3 Question 63 Discussion

Actual exam question for Databricks's Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 exam
Question #: 63
Topic #: 3
[All Databricks-Certified-Associate-Developer-for-Apache-Spark-3.0 Questions]

The code block displayed below contains an error. The code block should configure Spark to split data in 20 parts when exchanging data between executors for joins or aggregations. Find the error.

Code block:

spark.conf.set(spark.sql.shuffle.partitions, 20)

Show Suggested Answer Hide Answer
Suggested Answer: C

Correct code block:

spark.conf.set('spark.sql.shuffle.partitions', 20)

The code block expresses the option incorrectly.

Correct! The option should be expressed as a string.

The code block sets the wrong option.

No, spark.sql.shuffle.partitions is the correct option for the use case in the question.

The code block sets the incorrect number of parts.

Wrong, the code block correctly states 20 parts.

The code block uses the wrong command for setting an option.

No, in PySpark spark.conf.set() is the correct command for setting an option.

The code block is missing a parameter.

Incorrect, spark.conf.set() takes two parameters.

More info: Configuration - Spark 3.1.2 Documentation


Contribute your Thoughts:

Dusti
2 months ago
I think the correct answer is E) The code block is missing a parameter.
upvoted 0 times
...
Isaiah
2 months ago
I think the code block is just fine. Maybe the question is trying to trick us, like a sneaky little spider trying to catch its prey. But I ain't falling for it, no sir!
upvoted 0 times
Kimbery
21 days ago
D) The code block sets the incorrect number of parts.
upvoted 0 times
...
Lang
22 days ago
C) The code block expresses the option incorrectly.
upvoted 0 times
...
Vicente
1 months ago
B) The code block sets the wrong option.
upvoted 0 times
...
Brande
1 months ago
A) The code block uses the wrong command for setting an option.
upvoted 0 times
...
...
Devorah
2 months ago
I believe the code block is missing a parameter for setting the shuffle partitions.
upvoted 0 times
...
Launa
2 months ago
Nah, the code block is setting the right option, but the number of parts should be 200, not 20. Clearly, the developer is a rookie who doesn't understand the importance of parallelism.
upvoted 0 times
Dorathy
1 months ago
Yeah, it should be 200 instead of 20 for better parallelism.
upvoted 0 times
...
Coletta
2 months ago
The code block sets the incorrect number of parts.
upvoted 0 times
...
...
Cheryl
2 months ago
I agree with Louvenia, the code block should configure Spark to split data in 20 parts.
upvoted 0 times
...
Louvenia
2 months ago
I think the error is that the code block sets the wrong option.
upvoted 0 times
...
Christiane
3 months ago
The code block is using the correct command, but the option name is misspelled. It should be 'spark.sql.shuffle.partitions' instead of 'spark.sql.shuffle.partitions'.
upvoted 0 times
Vincent
2 months ago
D) The code block sets the incorrect number of parts.
upvoted 0 times
...
Lawrence
2 months ago
B) The code block sets the wrong option.
upvoted 0 times
...
Sharee
2 months ago
A) The code block uses the wrong command for setting an option.
upvoted 0 times
...
...

Save Cancel