SnowPro Advanced: Data Engineer — Question 64
A Data Engineer has created a scalar User-Defined Function (UDF) that contains a SELECT statement based on a projection constraint column. The Engineer notices that the UDF behaves differently depending on how it is being used.
What are the expected behaviors of the UDF for the named context? (Choose two.)
Answer options
- A. Scalar SQL UDF - Snowflake allows the query to execute and returns NULL.
- B. Scalar SQL UDF - Snowflake blocks the query.
- C. Logging & Event Tables - Snowflake allows the UDF to execute and captures log and event details.
- D. Logging & Event Tables - Snowflake allows the UDF to execute but does not capture log and event details.
- E. Logging & Event Tables - Snowflake blocks the UDF but allows the statement calling the UDF to run to support logging requirements.
Correct answer: A, D
Explanation
The correct answer A indicates that when using a Scalar SQL UDF, Snowflake allows execution and can return NULL, which is expected behavior. Option D is correct because it states that the UDF executes without capturing logs, aligning with the behavior in Logging & Event Tables. Options B, C, and E do not accurately describe the expected behaviors in the given contexts.