nerdexam
Snowflake

COF-C02 · Question #14

A user has 10 files in a stage containing new customer data. The ingest operation completes with no errors, using the following command: COPY INTO my__table FROM @my__stage; The next day the user…

The correct answer is A. All data from all of the files on the stage will be appended to the table. When the COPY INTO command is executed in Snowflake, it processes all files present in the specified stage that have not been ingested before or marked as already loaded. Since the user did not remove the original 10 files after the first load, running the same COPY INTO…

Data Loading and Unloading

Question

A user has 10 files in a stage containing new customer data. The ingest operation completes with no errors, using the following command:

COPY INTO my__table FROM @my__stage; The next day the user adds 10 files to the stage so that now the stage contains a mixture of new customer data and updates to the previous data. The user did not remove the 10 original files. If the user runs the same copy into command what will happen?

Options

  • AAll data from all of the files on the stage will be appended to the table.
  • BOnly data about new customers from the new files will be appended to the table.
  • CThe operation will fail with the error uncertain files in stage.
  • DAll data from only the newly-added files will be appended to the table.

How the community answered

(48 responses)
  • A
    85% (41)
  • B
    2% (1)
  • C
    8% (4)
  • D
    4% (2)

Explanation

When the COPY INTO command is executed in Snowflake, it processes all files present in the specified stage that have not been ingested before or marked as already loaded. Since the user did not remove the original 10 files after the first load, running the same COPY INTO command again will result in all 20 files being processed. This means that the data from the original 10 files will be appended to the table again, along with the data from the new 10 files, potentially leading to duplicate records for the original data set.

Topics

#Data Loading#COPY INTO#Stage#Duplicate Data

Community Discussion

No community discussion yet for this question.

Full COF-C02 Practice