OBJECT_CONSTRUCT builds the JSON structure from relational data, and TO_JSON converts that structure into the final JSON string for unloading into files. Both answers seem to be steps of the solution, but since the question mentions the table as the source, my guess would be D
No, D is not correct. As long as Variant column is not part of the action, it is about TO_JSON, since, we do not need to construct any object, like Variant column.
D is correct:
Unloading a relational table to JSON
You can use the OBJECT_CONSTRUCT function combined with the COPY command to convert the rows in a relational table to a single VARIANT column and unload the rows into a file.
https://docs.snowflake.com/en/user-guide/data-unload-considerations
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
azprepd
1 month, 1 week ago37ceea2
6 months, 1 week ago2cb777b
5 months, 3 weeks agoAparna98
10 months, 3 weeks agonexerSnow
10 months, 4 weeks ago4762448
11 months, 1 week agoicegrandpa
11 months, 1 week ago