
Answer-first summary for fast verification
Answer: OBJECT_CONSTRUCT
The question asks which function unloads data from a relational table to JSON. OBJECT_CONSTRUCT (D) is the correct answer because it specifically builds JSON objects from relational data by converting table rows into a VARIANT column containing JSON structures, which can then be unloaded using the COPY command. This is supported by Snowflake documentation and community consensus, with 67% of users selecting D and comments citing official resources. TO_JSON (B) converts existing VARIANT data to JSON strings but does not directly handle relational table unloading, and TO_OBJECT/A is not a valid Snowflake function. TO_VARIANT (C) converts data to VARIANT type but does not specifically format it as JSON for unloading.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.