
Answer-first summary for fast verification
Answer: A single compressed JSON file with a single VARIANT column
The correct answer is A because the query unloads a single row using OBJECT_CONSTRUCT, which creates one JSON object. By default, Snowflake unloads data into compressed files, and since there's only one row, it results in a single compressed JSON file. The community discussion shows mixed opinions, but the official Snowflake documentation and the fact that SINGLE=TRUE is not required for single-row unloads support option A. Option B is incorrect because multiple files are only created when data exceeds the default file size (16MB), which doesn't apply here with just one row. Options C and D are incorrect because Snowflake compresses unloaded files by default unless explicitly disabled.
Author: LeetQuiz Editorial Team
Ultimate access to all 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)
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 contain?
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
No comments yet.