exam questions

Exam SnowPro Core All Questions

View all questions & answers for the SnowPro Core exam

Exam SnowPro Core topic 1 question 694 discussion

Actual exam question from Snowflake's SnowPro Core
Question #: 694
Topic #: 1
[All SnowPro Core Questions]

A user is unloading data to a stage using this command:

copy into @message from (select object_construct('id', 1, 'first_name', 'Snowflake', 'last_name', 'User', 'city', 'Bozeman')) file_format = (type = json)

What will the output file in the stage be?

  • A. A single compressed JSON file with a single VARIANT column
  • B. Multiple compressed JSON files with a single VARIANT column
  • C. A single uncompressed JSON file with multiple VARIANT columns
  • D. Multiple uncompressed JSON files with multiple VARIANT columns
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
vinny2020
Highly Voted 1 year ago
Selected Answer: A
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.
upvoted 7 times
SvenSven
10 months ago
Hence answer B. It doesn't specify file compression in the statement.
upvoted 1 times
...
zzeng
4 months ago
Agree, it's A. Because it's copy into @message from (select object_construct('id', 1, 'first_name', 'Snowflake', 'last_name', 'User', 'city', 'Bozeman')) file_format = (type = json) It has only 1 row here.
upvoted 2 times
...
...
SSahar
Highly Voted 5 months, 2 weeks ago
Selected Answer: B
OBJECT_CONSTRUCT function combined with the COPY command to convert the rows in a relational table to a single VARIANT. The question is a single or multiple files. The compression bof data is by defaut. So it's between A and B but since the parameter SINGLE=TRUE is not sprecified, shouldn't the answer be multiple compressed files hence B?
upvoted 5 times
SSahar
5 months, 2 weeks ago
well according to the documentation it's one file: https://docs.snowflake.com/en/user-guide/data-unload-considerations#unloading-a-relational-table-to-json So I guess it's A
upvoted 4 times
...
...
JRayan
Most Recent 4 days ago
Selected Answer: B
SINGLE - default is False when it's explicitly mentioned. hence, it should be option B
upvoted 1 times
...
vishnuas
9 months ago
The answer is B. By default the unloading is compressed. and by default the unloading occurs into multiple files of 16MB
upvoted 1 times
...
BobFar
9 months, 3 weeks ago
Correct Answer is A https://docs.snowflake.com/en/user-guide/data-unload-considerations#unloading-a-relational-table-to-json
upvoted 3 times
...
arnabbis4u
1 year ago
Answer is A
upvoted 1 times
arnabbis4u
1 year ago
https://docs.snowflake.com/en/user-guide/data-unload-considerations#:~:text=You%20can%20use%20the%20OBJECT_CONSTRUCT%20function%20combined%20with%20the%20COPY%20command%20to%20convert%20the%20rows%20in%20a%20relational%20table%20to%20a%20single%20VARIANT%20column%20and%20unload%20the%20rows%20into%20a%20file.
upvoted 1 times
...
...
MultiCloudIronMan
1 year, 1 month ago
Selected Answer: A
I think its A
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
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.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago