ARA-C01 Question 283
Single answerReload process (load history)A data engineering team loads daily CSV files from an internal stage into the SALES_RAW table using COPY INTO SALES_RAW FROM @daily_stage FILE_FORMAT = (TYPE = CSV). One source file was corrected after an earlier bad load, but the file name remained exactly the same. The team needs to reload only that corrected file into SALES_RAW as quickly as possible, without changing the file name in the stage and without reloading every file in the stage. Which approach should the architect recommend?
- A
Run COPY INTO SALES_RAW again for the same staged file and rely on Snowflake to detect that the file contents changed, even though the name is unchanged.
- B
Use COPY INTO SALES_RAW with the FORCE = TRUE option while targeting the specific corrected file.
- C
Delete the existing rows from SALES_RAW and rerun the original COPY INTO command without any additional options.
- D
Truncate SALES_RAW and rerun COPY INTO from the stage so Snowflake reloads all files and replaces the load history.
Show answer and explanation
Correct answer: B
Explanation
Snowflake maintains load history for data loaded with COPY INTO tables, which helps prevent duplicate ingestion of the same staged files. In a reload scenario where a file was corrected but retains the same name, Snowflake will not automatically reload it just because the contents changed. The architect should use COPY INTO ... FORCE = TRUE and scope the command to the specific file that must be reprocessed. This aligns with Snowflake best practices for controlled reloads and minimizes the blast radius compared with truncating or broadly reloading from the stage. A key exam point is that table data changes, such as DELETE or TRUNCATE, are separate from the metadata Snowflake uses to decide whether staged files have already been loaded.
- A. Incorrect.
Incorrect. Snowflake tracks load history to prevent accidental duplicate loading of files for COPY INTO operations. If the file has already been loaded, rerunning COPY INTO for the same file name without an override will typically skip it based on load metadata, even if the external file contents were changed. A common misconception is that Snowflake re-hashes and reloads the file automatically whenever contents change.
- B. Correct.
Correct. FORCE = TRUE tells Snowflake to load the specified file again even if it appears in the table's load history. This is the standard approach when a file with the same name must be reprocessed without clearing and reloading unrelated files. Targeting the specific file also minimizes unnecessary work and reduces the risk of duplicate loads from other staged files.
- C. Incorrect.
Incorrect. Removing rows from the target table does not clear the COPY load history that Snowflake uses to determine whether a staged file has already been processed for that table. As a result, the same file would still be skipped unless the load operation is forced or otherwise handled explicitly.
- D. Incorrect.
Incorrect. Truncating the table is unnecessary and risky in this scenario. It would remove all table data and still does not represent the best targeted solution for reloading one corrected file. The operational goal is to reload only one file, and FORCE = TRUE on that file is the more precise and efficient method.