SnowPro Core Exam QuestionsBrowse all questions from this exam

SnowPro Core Exam - Question 1279


How can a relational table be unloaded into a JSON file?

Show Answer
Correct Answer:

Discussion

6 comments
Sign in to comment
bor4unOption: A
Jan 24, 2025

https://docs.snowflake.com/en/user-guide/data-unload-considerations#unloading-a-relational-table-to-json

37ceea2Option: A
Jan 31, 2025

-- Unload the data to a file in a stage COPY INTO @mystage FROM (SELECT OBJECT_CONSTRUCT('id', id, 'first_name', first_name, 'last_name', last_name, 'city', city, 'state', state) FROM mytable) FILE_FORMAT = (TYPE = JSON); -- The COPY INTO location statement creates a file named data_0_0_0.json.gz in the stage.

37ceea2
Feb 10, 2025

Please, disregard. The question does not say anything about an Object_Construct. Right answer is B.

37ceea2Option: B
Feb 21, 2025

The question does not say anything about an Object_Construct. Right answer is B.

Mohit78jainOption: A
Jan 9, 2025

A is correct

MatthieuDNOption: A
Jan 24, 2025

A, seen many times

t945123456Option: A
Feb 27, 2025

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