nerdexam
Snowflake

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…

Data Loading and Unloading

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)
  • A
    4% (1)
  • C
    93% (26)
  • D
    4% (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

#Data Unloading#COPY INTO#SINGLE parameter#File Output

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice