nerdexam
Snowflake

COF-C02 · Question #301

Which semi-structured data function interprets an input string as a JSON document that produces a VARIANT value?

The correct answer is A. PARSE_JSON. PARSE_JSON is the Snowflake function that takes an input string and interprets it as a JSON document, returning a VARIANT value. CHECK_JSON only validates whether a string is valid JSON (returning NULL if valid, or an error message if not), without producing a VARIANT…

Data Transformations

Question

Which semi-structured data function interprets an input string as a JSON document that produces a VARIANT value?

Options

  • APARSE_JSON
  • BCHECK_JSON
  • CJSON_EXTRACT_PATH_TEXT
  • DPARSE_XML

How the community answered

(36 responses)
  • A
    86% (31)
  • B
    3% (1)
  • C
    8% (3)
  • D
    3% (1)

Explanation

PARSE_JSON is the Snowflake function that takes an input string and interprets it as a JSON document, returning a VARIANT value. CHECK_JSON only validates whether a string is valid JSON (returning NULL if valid, or an error message if not), without producing a VARIANT. JSON_EXTRACT_PATH_TEXT extracts a specific value at a given path from an already-parsed JSON string. PARSE_XML does the same concept but for XML documents, not JSON.

Topics

#Semi-structured data#JSON#VARIANT data type#SQL Functions

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice