Deal of The Day! 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
15 days ago
I think the correct answer is E) The code block is missing a parameter.
upvoted 0 times
...
Isaiah
24 days 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
Vicente
6 days ago
B) The code block sets the wrong option.
upvoted 0 times
...
Brande
11 days ago
A) The code block uses the wrong command for setting an option.
upvoted 0 times
...
...
Devorah
26 days ago
I believe the code block is missing a parameter for setting the shuffle partitions.
upvoted 0 times
...
Launa
27 days 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
8 days ago
User 2: Yeah, it should be 200 instead of 20 for better parallelism.
upvoted 0 times
...
Coletta
19 days ago
User 1: The code block sets the incorrect number of parts.
upvoted 0 times
...
...
Cheryl
1 months ago
I agree with Louvenia, the code block should configure Spark to split data in 20 parts.
upvoted 0 times
...
Louvenia
1 months ago
I think the error is that the code block sets the wrong option.
upvoted 0 times
...
Christiane
2 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
1 months ago
D) The code block sets the incorrect number of parts.
upvoted 0 times
...
Lawrence
1 months ago
B) The code block sets the wrong option.
upvoted 0 times
...
Sharee
1 months ago
A) The code block uses the wrong command for setting an option.
upvoted 0 times
...
...

Save Cancel