SnowPro Core Certification — Question 524
A Snowflake user is writing a User-Defined Function (UDF) with some unqualified object names.
How will those object names be resolved during execution?
Answer options
- 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.
Correct answer: B
Explanation
The correct answer is B because Snowflake resolves unqualified object names by only checking the schema to which the UDF belongs. Options A, C, and D are incorrect as they suggest additional schemas or parameters that Snowflake does not consider when resolving unqualified names in a UDF context.