nerdexam
Snowflake

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

Querying and Performance

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)
  • A
    3% (1)
  • B
    88% (30)
  • C
    3% (1)
  • D
    6% (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

#semi-structured data#JSON#PARSE_JSON function#data extraction

Community Discussion

No community discussion yet for this question.

Full SOL-C01 Practice