
Answer-first summary for fast verification
Answer: OBJECT_CONSTRUCT
The correct answer is OBJECT_CONSTRUCT because it is specifically designed to construct JSON objects from relational data. When combined with the COPY INTO command, OBJECT_CONSTRUCT can convert table rows into JSON format for unloading to files. The community discussion shows 100% consensus on answer D, with multiple users confirming this is correct and one providing a detailed reference to Snowflake documentation that explicitly states OBJECT_CONSTRUCT should be used for unloading relational tables to JSON. The other options are unsuitable: LATERAL is for joining with table functions, CAST is for data type conversion, and FLATTEN is for parsing nested data rather than creating JSON.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.