Study FAQ
Why does a staged file get skipped by bulk COPY INTO in Snowflake?
Also asked as 2
- How can I tell whether Snowflake bulk COPY excluded a file or already loaded it?
- Why does LIST show a file that my Snowflake bulk load skipped?
Answer
If a file appears in LIST but is skipped by bulk COPY INTO <table>, first compare its full path with the COPY path, FILES list, and PATTERN. Then check whether the target table's load metadata recognizes the file as already loaded or cannot establish the load status of an older file.
Use a narrow path or prefix for recurring feeds, FILES for an explicit set of up to 1,000 names, or PATTERN when filenames need regex matching. Bulk COPY applies the regular expression to the full storage location in the FROM clause. Snowpipe trims the stage and pipe path before matching, so validate separately before reusing a regex. Compare the selected names with the manifest before changing the copy options.
Bulk-load metadata expires after 64 days. With an older staged file, a recent successful load or recent initial load of the table can still let Snowflake determine status. If the status is unknown, COPY skips the file by default. LOAD_UNCERTAIN_FILES = TRUE opts in to files with uncertain status while respecting known load history. FORCE = TRUE can reload files already known to be loaded. Either option warrants reconciling the result against the manifest and existing rows, since metadata alone cannot make a replay idempotent.
COPY INTO table options · Loading considerations and load metadata · LIST
Full explanation
Loading Data with Stages, File Formats, COPY INTO, and Snowpipe
Study guide · COF-C03
Read the full explanation