
Answer-first summary for fast verification
Answer: Snowflake will only check the schema the UDF belongs to.
According to Snowflake's official documentation on name resolution, the SEARCH_PATH parameter is NOT used inside views or User-Defined Functions (UDFs). All unqualified objects in a UDF definition are resolved in the UDF's schema only. This is explicitly stated in the Snowflake documentation and supported by multiple community comments with upvotes, including one with 4 upvotes that directly quotes the documentation. While option A mentions SEARCH_PATH resolution (which applies to regular queries), it does not apply to UDFs. Options C and D describe search patterns that are not used for UDF resolution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A Snowflake user is creating a User-Defined Function (UDF) that contains unqualified object names.
How will Snowflake resolve these object names when the UDF is executed?
A
Snowflake will resolve them according to the SEARCH_PATH parameter.
B
Snowflake will only check the schema the UDF belongs to.
C
Snowflake will first check the current schema, and then the schema the previous query used.
D
Snowflake will first check the current schema, and then the PUBLIC schema of the current database.
No comments yet.