COF-C03 - Data Loading, Unloading, and Connectivity (18% of the exam) - Section 3.3

Unload data from Snowflake with COPY INTO location, choosing file format, compression, and single or multiple output files.

Unload query results to a stage with COPY INTO location: select the output file format and compression, choose between one file and many with the SINGLE and MAX_FILE_SIZE options, and retrieve files from an internal stage with GET. Recognise the default formats and how PARTITION BY can organise unloaded files.

data unloadingCOPY INTO locationSINGLE and MAX_FILE_SIZEGET commandfile compression

Practice question for this objective

Free sampleData Loading, Unloading, and Connectivitymedium

An analyst unloads a query result to an internal stage with COPY INTO and a downstream tool requires the entire output to arrive as one object so it can be ingested in a single read. The result set is small enough to fit comfortably in one file. Which COPY INTO location option should the analyst set to guarantee one output file?

  • ASet SINGLE = TRUE so the unload writes all rows into one output file on the stage instead of the default behaviour of producing several files Correct
  • BSet MAX_FILE_SIZE to a very small byte value so the unload is forced to collapse all of the rows into one compact output file on the stage
  • CSet OVERWRITE = TRUE so any earlier files are replaced and the unload is then reduced to writing a single combined output file on the stage
  • DSet DETAILED_OUTPUT = TRUE so the unload reports each row group and consolidates the parallel threads into one output file on the stage
Recognise that SINGLE = TRUE forces COPY INTO location to write one output file instead of the default multiple files. By default COPY INTO location runs in parallel and writes multiple files, one per data file produced by the execution threads. Setting SINGLE = TRUE overrides this so all unloaded rows go into a single file, which is required when a downstream consumer must read the output as one object. MAX_FILE_SIZE and OVERWRITE control file size and replacement, not the count of files.

Why A is correct: SINGLE = TRUE directs COPY INTO location to write one output file rather than the default set of parallel files, which is exactly what a single-read consumer needs.

Why B is wrong: MAX_FILE_SIZE caps each file's size, so a small value would create more files rather than fewer, which is the opposite of producing a single object.

Why C is wrong: OVERWRITE only controls whether existing files at the path are replaced, so it does not change how many files the unload produces and never forces one file.

Why D is wrong: DETAILED_OUTPUT only expands the result rows the command returns about the operation, so it changes reporting and not the number of files written.

See more COF-C03 practice questions, answers explained.

Exam traps in Data Loading, Unloading, and Connectivity

Answers that look right on this material and are not. Each one is a distractor from a different question in the COF-C03 bank for this domain.

  • With SINGLE = TRUE the MAX_FILE_SIZE value is ignored entirely, and Snowflake always splits unloaded output strictly on a fixed 5 GB internal boundary it enforces.

    Why it is wrong: It is tempting because a 5 GB-style cap exists, but SINGLE = TRUE does honour MAX_FILE_SIZE up to its supported maximum rather than ignoring the value outright.

  • Set SINGLE = TRUE and set MAX_FILE_SIZE to the chosen per-file limit so the unload still writes one file per execution thread under that size

    Why it is wrong: SINGLE = TRUE forces a single output file, so it cannot produce the many parallel files the team wants, which defeats concurrent downstream processing.

  • Set the COMPRESSION option to AUTO in the file format so Snowflake detects that the parser cannot decompress and therefore leaves the unloaded files uncompressed.

    Why it is wrong: This is tempting because AUTO sounds adaptive, but for unloads AUTO resolves to the default gzip codec rather than detecting downstream limits and skipping compression.

Examworthy is not affiliated with or endorsed by Snowflake. Original, blueprint-aligned practice material only.