COF-C02 · Question #651
Which function is used to unload a relational table into a JSON file*?
The correct answer is D. TO_JSON. TO_JSON(variant_value) serializes a VARIANT, OBJECT, or ARRAY value into a JSON-formatted string, making it the appropriate function when converting relational data into JSON output for unloading. PARSE_JSON (A) does the opposite - it parses a JSON string into a VARIANT…
Question
Which function is used to unload a relational table into a JSON file*?
Options
- APARSE_JSON
- BJSON_EXTRACT_PATH_TEXT
- COBJECT_CONSTRUCT
- DTO_JSON
How the community answered
(25 responses)- A4% (1)
- C4% (1)
- D92% (23)
Explanation
TO_JSON(variant_value) serializes a VARIANT, OBJECT, or ARRAY value into a JSON-formatted string, making it the appropriate function when converting relational data into JSON output for unloading. PARSE_JSON (A) does the opposite - it parses a JSON string into a VARIANT. JSON_EXTRACT_PATH_TEXT (B) extracts a specific value from a JSON document by path. OBJECT_CONSTRUCT (C) builds a JSON object from key-value pairs and is often used as an intermediate step before TO_JSON, but TO_JSON is the function that produces the final serialized JSON string used in unloading scenarios.
Topics
Community Discussion
No community discussion yet for this question.