COF-C02 practice question 28 of 35

Which command will unload data from a table into an external stage?

Full set: 778 questions
Answer options
A: PUT
B: INSERT
C: COPY INTO Correct answer
D: GET
Correct Answer:
C. COPY INTO
Explanation

The COPY INTO command is used to unload data from a Snowflake table into a specified location, which can be a named internal stage, a named external stage, or an external location like an S3 bucket. This command copies the result of a query (e.g., SELECT FROM mytable) into one or more data files within the designated stage. It is the standard and primary SQL command for exporting data from Snowflake tables to staged files.

Why Incorrect

A. PUT: The PUT command uploads local files from a client machine to a Snowflake stage. It does not unload data from a table.
B. INSERT: The INSERT command adds new rows of data into a Snowflake table. It is used for data manipulation within the database, not for exporting data.
D. GET: The GET command downloads files from a Snowflake stage to a local client machine. It does not interact directly with tables to unload data.

References

1. Snowflake Documentation: COPY INTO

Section: SQL Command Reference > DML Commands > COPY INTO

Content: "Unloads data from a table (or query) into one or more files in one of the following locations: Named internal stage

Named external stage

[or] External location..." This directly confirms the command's purpose for unloading to an external stage.

2. Snowflake Documentation: Unloading Data

Section: Data Loading & Unloading > Unloading Data

Content: "Snowflake supports using the COPY INTO command to unload data from a table into files in a Snowflake stage (internal or external)." This provides a high-level overview confirming the use of COPY INTO.

3. Snowflake Documentation: PUT

Section: SQL Command Reference > DML Commands > PUT

Content: "Uploads (i.e. stages) data files from a local directory/folder on a client machine to a Snowflake stage." This clarifies that PUT is for uploading to a stage

not unloading from a table.

4. Snowflake Documentation: GET

Section: SQL Command Reference > DML Commands > GET

Content: "Downloads data files from a Snowflake stage to a local directory/folder on a client machine." This shows GET is for downloading from a stage

not unloading from a table.

Scroll to Top