
Answer-first summary for fast verification
Answer: The unload operation partitions table rows into separate files unloaded to the specified stage.
The PARTITION BY option in a COPY INTO command is used during data unloading operations to partition table rows into separate files based on the specified expression, and these files are unloaded to the specified stage. Option B correctly describes this behavior, as confirmed by the community discussion where all answers point to B with 100% consensus, and detailed comments reference Snowflake documentation stating that PARTITION BY partitions unloaded rows into separate files in the stage. Option A is incorrect because it mentions unloading to a 'table' instead of a 'stage'. Options C and D are incorrect because they describe loading operations (single file with partition keys) rather than unloading operations, and PARTITION BY is not used for clustering or pruning in this context.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
How does the PARTITION BY clause affect the output of files generated by a COPY INTO {location} command?
A
The unload operation partitions table rows into separate files unloaded to the specified table.
B
The unload operation partitions table rows into separate files unloaded to the specified stage.
C
A single file will be loaded with a user-defined partition key and the user can use this partition key for clustering.
D
A single file will be loaded with a Snowflake-defined partition key and Snowflake will use this key for pruning.
No comments yet.