COF-C02 · Question #480
COF-C02 Question #480: Real Exam Question with Answer & Explanation
The correct answer is D: Snowflake will first check the current schema, and them the PUBLIC schema of the current. Object Name Resolution: When unqualified object names (e.g., table name without schema) are used in a UDF, Snowflake follows a specific hierarchy to resolve them. Here's the order: Current Schema: Snowflake first checks if an object with the given name exists in the schema curren
Question
A Snowflake user is writing a User-Defined Function (UDF) that includes some unqualified object names. How will those object names be resolved during execution?
Options
- ASnowflake will resolve them according to the SEARCH_PATH parameter.
- BSnowflake will only check the schema the UDF belongs to.
- CSnowflake will first check the current schema, and then the schema the previous query used
- DSnowflake will first check the current schema, and them the PUBLIC schema of the current
Explanation
Object Name Resolution: When unqualified object names (e.g., table name without schema) are used in a UDF, Snowflake follows a specific hierarchy to resolve them. Here's the order: Current Schema: Snowflake first checks if an object with the given name exists in the schema currently in use for the session. PUBLIC Schema: If the object isn't found in the current schema, Snowflake looks in the PUBLIC schema of the current database. Note: The SEARCH_PATH parameter influences object resolution for queries, not within UDFs.
Topics
Community Discussion
No community discussion yet for this question.