COF-C02 · Question #596
How can staged files be removed during data loading once the files have loaded successfully?
The correct answer is B. Use the purge copy option. The PURGE = TRUE copy option in the COPY INTO <table> command instructs Snowflake to automatically delete staged source files from the stage after they are successfully loaded. DROP (A) is a DDL command for dropping database objects, not for removing staged files post-load…
Question
How can staged files be removed during data loading once the files have loaded successfully?
Options
- AUse the DROP command
- BUse the purge copy option.
- CUse the FORCE = TRUE parameter
- DUse the LOAD UNCERTAIN FILES copy option.
How the community answered
(29 responses)- B90% (26)
- C7% (2)
- D3% (1)
Explanation
The PURGE = TRUE copy option in the COPY INTO <table> command instructs Snowflake to automatically delete staged source files from the stage after they are successfully loaded. DROP (A) is a DDL command for dropping database objects, not for removing staged files post-load. FORCE = TRUE (C) reloads files even if already loaded, ignoring the load history. LOAD_UNCERTAIN_FILES (D) retries files whose load status is uncertain - it does not remove files after loading.
Topics
Community Discussion
No community discussion yet for this question.