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
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.