nerdexam
DatabricksDatabricks

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK · Question #78

DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Question #78: Real Exam Question with Answer & Explanation

Sign in or unlock DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK to reveal the answer and full explanation for question #78. The question stem and answer options stay visible for context.

Spark SQL and DataFrames

Question

The code block shown below contains an error. The code block is intended to create the Scala UDF assessPerformanceUDF() and apply it to the integer column customers1t1sfaction in Data Frame storesDF. Identify the error. Code block:

Options

  • AThe input type of customerSatisfaction is not specified in the udf() operation.
  • BThe return type of assessPerformanceUDF() must be specified.
  • CThe withColumn() operation is not appropriate here - UDFs should be applied by iterating over
  • DThe assessPerformanceUDF() must first be defined as a Scala function and then converted to a
  • EUDFs can only be applied via SQL and not through the Data Frame API.

Unlock DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK to see the answer

You've previewed enough free DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK questions. Unlock DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Topics

#Spark UDFs#Scala Programming#Spark DataFrame API
Full DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK PracticeBrowse All DATABRICKS-CERTIFIED-ASSOCIATE-DEVELOPER-FOR-APACHE-SPARK Questions