Question 181 · 219 in bank
Which of the following code blocks prints the schema of DataFrame storesDF?
Show answer
Answer: B
Databricks Certified Associate Developer for Apache Spark219 questions across 22 pages are complete and free, with no account or card.
219 questions in this bank
Free access · progress saved on this device
Which of the following code blocks prints the schema of DataFrame storesDF?
Answer: B
The code block shown below should return a new 4-partition DataFrame from the 8-partition DataFrame storesDF without inducing a shuffle. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. Code block: _1_._2_(_3_)
Answer: B
The code block shown below contains an error. The code block intended to return a new DataFrame that is the result of an outer join between DataFrame storesDF and DataFrame employeesDF on column storeId. Identify the error. Code block: storesDF.join(employeesDF, "storeId")
Answer: A
If Spark is running in cluster mode, which of the following statements about nodes is incorrect?
Answer: E
The code block shown below should create a Python UDF assessPerformanceUDF using the Python function assessPerformance() and apply it to column customerSatisfaction in DataFrame storesDF. Choose the response that correctly fills in the numbered blanks within the code block to complete this task. Code block: assessPerformanceUDF = _1_(_2_) storesDF.withColumn(“result”, _3_(_4_))
Answer: B
A developer needs to produce a Python dictionary using data stored in a small Parquet table, which looks like this:
The resulting Python dictionary must contain a mapping of region –> region_id containing the smallest 3 region_id values. Which code fragment meets the requirements?
Answer: B
A Spark engineer is troubleshooting a Spark application that has been encountering out-of-memory errors during execution. By reviewing the Spark driver logs, the engineer notices multiple “GC overhead limit exceeded” messages. Which action should the engineer take to resolve this issue?
Answer: C
A Spark developer wants to improve the performance of an existing PySpark UDF that runs a hash function that is not available in the standard Spark functions library. The existing UDF code is:
The developer wants to replace this existing UDF with a Pandas UDF to improve performance. The developer changes the definition of shake_256_udf to this: shake_256_udf = sf.pandas_udf(shake_256, StringType()) However, the developer receives the error: [UNSUPPORTED_SIGNATURE] Unsupported signature: (raw: str) –> str. What should the signature of the shake_256() function be changed to in order to fix this error?
Answer: D
A Developer is working with a pandas DataFrame containing user behaviour data from a web application. Which approach should be used for executing groupby operation in parallel across all workers of Apache Spark 3.5?
Answer: A
A data engineer has been asked to produce a Parquet table which is overwritten every day with the latest data. The downstream consumer of this Parquet table has a hard requirement that the data in this table is produced with all records sorted by the market_time field. Which line of Spark code will produce a Parquet table that meets these requirements?
Answer: C
Keyboard:J Kmove between questionsA–Dselect an answerRshow or hide the answer← →change page
SPARK-DEV practice, question 181. 219 questions available.
Version 1.0.0. How we source questions