Exam SnowPro Core All QuestionsBrowse all questions from this exam
Question 1070

What function, combined with the copy command, should be used to unload data from a relational table into a JSON file?

    Correct Answer: D

    To unload data from a relational table into a JSON file, you would use the OBJECT_CONSTRUCT function combined with the COPY command. OBJECT_CONSTRUCT takes the rows from the relational table and converts them into a single VARIANT column, which can then be unloaded into a JSON file. This function is specifically designed for the purpose of constructing JSON objects from table data.

Discussion
4762448Option: D

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