The correct answer is C. GET_PATH .
GET_PATH extracts a value from semi-structured data using a path expression. It can be used to access values inside an object, including nested values.
Why C is correct:
For an object stored in a VARIANT or OBJECT column, GET_PATH can retrieve a value by specifying the key path.
Example:
SELECT GET_PATH(src, ' customer.name ' )
FROM my_table;
This accesses the name value inside the customer object.
Why the other options are incorrect:
A. OBJECT_KEYS returns the keys from an object, not the values for a specific key path.
B. OBJECT_PICK returns a new object containing selected key-value pairs, but it is not the general function for accessing a value by path.
D. XMLGET is used for XML data, not general JSON-style object access.
Official Snowflake documentation reference:
Snowflake documentation describes GET_PATH as a function that extracts a value from semi-structured data using a path name.
[Reference: Snowflake Documentation — GET_PATH; Querying semi-structured data; SnowPro Core Study Guide — Working with Semi-Structured Data., ========================]