
Ultimate access to all questions.
As a data engineer, you are given a table named stores that contains a column named city, which holds string values representing the names of cities. You need to apply some custom logic to the city column as part of a specific data processing use case. To implement this custom logic efficiently across the dataset within Databricks, you want to create a SQL user-defined function (UDF). Which of the following code blocks will allow you to create this SQL UDF?
A
CREATE FUNCTION custom_logic(city STRING) RETURNS STRING BEGIN RETURN UPPER(city); END;_
B
CREATE UDF custom_logic(city STRING) RETURNS STRING BEGIN RETURN UPPER(city); END;_
C
CREATE FUNCTION UDF custom_logic(city STRING) RETURNS STRING BEGIN RETURN UPPER(city); END;_
D
CREATE FUNCTION custom_logic(city STRING) RETURNS CASE WHEN city IS NOT NULL THEN UPPER(city) ELSE city END;_
E
CREATE UDF custom_logic(city STRING) RETURNS CASE WHEN city IS NOT NULL THEN UPPER(city) ELSE city END;_