QuestionQ222
VerifiedUsing Spark SQLThe code block below has an error. It is intended to create and register a SQL UDF named ASSESS_PERFORMANCE by using the Scala function assessPerformance(), then apply it to the customerSatisfaction column in the stores table. Identify the error.
Code block:
spark.udf.register(“ASSESS_PERFORMANCE”, assessPerforance)
spark.sql(“SELECT customerSatisfaction, assessPerformance(customerSatisfaction) AS result FROM stores”)
Community Discussion