SOL-C01 · Question #284
When querying semi-structured data in Snowflake, which function extracts a specific field from a JSON document?
The correct answer is B. PARSE_JSON(). PARSE_JSON() is Snowflake's core function for working with JSON data. It converts a JSON-formatted string into a VARIANT data type, after which individual fields are accessed using colon (:) notation or dot notation (e.g., PARSE_JSON(json_col):field_name). The other options are n
Question
When querying semi-structured data in Snowflake, which function extracts a specific field from a JSON document?
Options
- AGET_PATH()
- BPARSE_JSON()
- CEXTRACT_JSON()
- DSELECT_FIELD()
How the community answered
(34 responses)- A3% (1)
- B88% (30)
- C3% (1)
- D6% (2)
Explanation
PARSE_JSON() is Snowflake's core function for working with JSON data. It converts a JSON-formatted string into a VARIANT data type, after which individual fields are accessed using colon (:) notation or dot notation (e.g., PARSE_JSON(json_col):field_name). The other options are not valid Snowflake functions - EXTRACT_JSON() and SELECT_FIELD() do not exist in Snowflake, and while GET_PATH() is a real Snowflake function, PARSE_JSON() is the foundational step for extracting content from a raw JSON document.
Topics
Community Discussion
No community discussion yet for this question.