Databricks Certified Data Engineer Associate · Free Practice Question Easy
Question 37
Which of the following code blocks can a data engineer use to create a user defined function (UDF) ?
-
A
CREATE FUNCTION plus_one(value INTEGER)
RETURNS INTEGER
RETURN value +1;
-
B
CREATE UDF plus_one(value INTEGER)
RETURN value +1;
-
C
CREATE FUNCTION plus_one(value INTEGER)
RETURN value +1
-
D
CREATE UDF plus_one(value INTEGER)
RETURNS INTEGER
RETURN value +1;
Reveal correct answer
Correct answer: A
Explanation
The correct syntax to create a UDF is:
- CREATE [OR REPLACE] FUNCTION function_name ( [ parameter_name data_type [, ...] ] )
- RETURNS data_type
- RETURN { expression | query }
Study materials from our exam preparation course on Udemy:
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
You must be logged in to post a comment.
