SnowPro Core Certification — Question 1319
Use of which Snowflake function is recommended when unloading data from a relational table into a JSON file?
Answer options
- A. TO_JSON
- B. TO_VARIANT
- C. OBJECT_INSERT
- D. OBJECT_CONSTRUCT
Correct answer: D
Explanation
The correct answer is D, OBJECT_CONSTRUCT, as it allows for creating a JSON object structure that can be easily written to a file. Options A (TO_JSON) and B (TO_VARIANT) do not format the data into a JSON structure suitable for file output, while C (OBJECT_INSERT) is used for modifying existing objects rather than creating them.