Explain Snowflake's COPY INTO bulk loading, its idempotency, and how it uses file load metadata

Quick Overview

Asks how the Snowflake COPY INTO command bulk-loads staged files into a table and how it avoids loading the same file twice. Tests knowledge of load metadata, re-run behavior, error handling options and the edge cases that can break idempotent loading.

Explain Snowflake's COPY INTO bulk loading, its idempotency, and how it uses file load metadata

Role: Data Scientist

Category: Data Manipulation (SQL/Python)

Difficulty: medium

Interview Round: Other

Explain the `COPY INTO` command for bulk data loading in Snowflake, including its idempotency and how it handles file processing metadata. ```hint What must be remembered Think about what Snowflake would need to remember about each staged file to decide whether a second run of the same command should load it. ``` ```hint Edge cases of that memory Consider what happens to that record when a file is modified, when it is very old, or when the target table is emptied. ``` ### What a Strong Answer Covers - What `COPY INTO <table>` reads from, what it writes to, and what compute it runs on - What load metadata is recorded for each file, where it lives and how long it is kept - How re-runs, modified files and very old files are treated - Options that change the default behavior, such as `FORCE`, `PURGE` and `LOAD_UNCERTAIN_FILES` - Error handling during a load and how to validate files before loading them ### Follow-up Questions - One colleague runs `TRUNCATE TABLE` and then re-runs `COPY INTO`; another runs `DELETE FROM` on the same table and re-runs it. What happens in each case? - A corrected version of an already loaded file is uploaded under the same name. What ends up in the table, and how would you design the pipeline to handle corrections? - How does continuous loading with Snowpipe differ from scheduled `COPY INTO` runs in how loaded files are tracked? - How would you prepare files and size the warehouse for a large one-time backfill?

Overview: Asks how the Snowflake COPY INTO command bulk-loads staged files into a table and how it avoids loading the same file twice. Tests knowledge of load metadata, re-run behavior, error handling options and the edge cases that can break idempotent loading.

General logo
General
Nov 25, 2026
mediumData ScientistOtherData Manipulation (SQL/Python)
0
0

Explain the COPY INTO command for bulk data loading in Snowflake, including its idempotency and how it handles file processing metadata.

What a Strong Answer Covers Guidance

  • What COPY INTO <table> reads from, what it writes to, and what compute it runs on
  • What load metadata is recorded for each file, where it lives and how long it is kept
  • How re-runs, modified files and very old files are treated
  • Options that change the default behavior, such as FORCE , PURGE and LOAD_UNCERTAIN_FILES
  • Error handling during a load and how to validate files before loading them

Follow-up Questions Guidance

  • One colleague runs TRUNCATE TABLE and then re-runs COPY INTO ; another runs DELETE FROM on the same table and re-runs it. What happens in each case?
  • A corrected version of an already loaded file is uploaded under the same name. What ends up in the table, and how would you design the pipeline to handle corrections?
  • How does continuous loading with Snowpipe differ from scheduled COPY INTO runs in how loaded files are tracked?
  • How would you prepare files and size the warehouse for a large one-time backfill?