
Ultimate access to all questions.
Which Snowflake command is used to export the results of a query into a single file?
A
Use COPY INTO [external stage] followed by a GET command to download the file.
B
Use COPY INTO [internal stage] followed by a PUT command to download the file.
C
Use COPY INTO [internal stage] with SINGLE = TRUE followed by a GET command to download the file.
D
Use COPY INTO [external stage] with SINGLE = TRUE followed by a PUT command to download the file.
Explanation:
The correct answer is C because it properly addresses the requirement to unload query results to a single file. The COPY INTO command with SINGLE = TRUE parameter ensures that all data is written to a single file rather than being split across multiple files. Using an internal stage is appropriate for unloading data from Snowflake, and the GET command is used to download files from the stage to a local system. Option A is incorrect because external stages are for loading data into Snowflake, not unloading. Option B is incorrect because it uses PUT (which uploads files to stages) instead of GET (which downloads files from stages). Option D is incorrect because it combines an external stage (wrong for unloading) with PUT (wrong direction). The community discussion confirms that SINGLE = TRUE is necessary to avoid multiple files and that GET is the correct command for downloading/unloading.