COF-C02 · Question #626
How can a 5 GB table be downloaded into a single file MOST efficiently?
The correct answer is C. Set the SINGLE parameter to TRUE. When unloading data from Snowflake using the COPY INTO <location> command, the default behavior splits the output into multiple files based on MAX_FILE_SIZE (default 16 MB). Setting the SINGLE parameter to TRUE forces Snowflake to write all unloaded data into a single output…
Question
How can a 5 GB table be downloaded into a single file MOST efficiently?
Options
- AKeep the default MAX_FILE_SIZE to 16 MB
- BSet the default MAX_FILE_SI2E to 5 GB.
- CSet the SINGLE parameter to TRUE.
- DUse a regular expression in the stage specifications of the COPY command.
How the community answered
(28 responses)- A4% (1)
- C93% (26)
- D4% (1)
Explanation
When unloading data from Snowflake using the COPY INTO <location> command, the default behavior splits the output into multiple files based on MAX_FILE_SIZE (default 16 MB). Setting the SINGLE parameter to TRUE forces Snowflake to write all unloaded data into a single output file, regardless of size. This is the direct and efficient solution for producing one file. Option B is syntactically incorrect ('MAX_FILE_SI2E' is a typo), and even if corrected, simply raising MAX_FILE_SIZE only sets an upper bound per file - it doesn't guarantee a single file when SINGLE is not TRUE. Option D (regex in stage specs) applies to file pattern matching during COPY INTO <table> (loading), not file consolidation during unloading.
Topics
Community Discussion
No community discussion yet for this question.