QuestionQ111
VerifiedDeveloping Apache Spark™ DataFrame/DataSet API ApplicationsThe code block below has an error. It is intended to create and register a SQL UDF named ASSESS_PERFORMANCE using the Python function assessPerformance() and apply it to column customerSatistfaction in table stores. Identify the error.
spark.udf.register("ASSESS_PERFORMANCE", assessPerformance)
spark.sql("SELECT customerSatisfaction, assessPerformance(customerSatisfaction) AS result FROM stores")
Community Discussion