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…
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)- A86% (31)
- B3% (1)
- C8% (3)
- D3% (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
Community Discussion
No community discussion yet for this question.