Finding and fixing what went wrong when a data load fails
Troubleshooting Snowflake data ingestion means using the right metadata views and functions to see why a COPY INTO or Snowpipe load failed, was skipped, or loaded unexpected data. Snowflake exposes load status through COPY_HISTORY, LOAD_HISTORY, and pipe-specific functions rather than traditional logs, so knowing where to look and what each source retains is essential for diagnosis.
1 · Learn the must-know
- Use the
INFORMATION_SCHEMA.COPY_HISTORYtable function (orACCOUNT_USAGE.COPY_HISTORYfor longer retention) to see file-level load status, row counts, and error messages for both COPY INTO and Snowpipe loads. - SYSTEM$
PIPE_STATUS() reports a pipe's execution state, pending file count, and last error, which is the first place to check when Snowpipe seems stalled. - The VALIDATE function or
VALIDATION_MODEcopy option lets you preview which rows/files would fail before actually loading data, without writing to the table. - Snowflake tracks loaded file names/checksums for 64 days per table (load metadata), so a previously loaded file with the same name/path is skipped unless FORCE=TRUE is specified.
ON_ERROR(CONTINUE,SKIP_FILE,SKIP_FILE_<n>,ABORT_STATEMENT) determines whether a batch load stops or continues on row errors, and controls how much of the file is skipped versus loaded.- For Snowpipe specifically, cloud provider notification failures, missing SQS/Event Grid/Pub-Sub permissions, or stage/notification integration misconfiguration are common root causes and are visible via
PIPE_USAGE_HISTORYand pipe error notifications (if configured).
2 · Check your understanding
A Data Engineer maintains a load into SALES.STAGING_ORDERS from files in @raw_stage using FILE_FORMAT = (TYPE = CSV, FIELD_DELIMITER = ',', SKIP_HEADER = 1) with ON_ERROR = 'CONTINUE' set on the COPY INTO statement. The most recent run completed with status Loaded, but the engineer suspects some rows were silently rejected. The engineer needs the exact rows and rejection reasons from that completed load, without re-executing the COPY INTO statement.
How can the engineer retrieve this information?
What you have tried across SnowPro Advanced Data Engineer's objectives, not a readiness score.
Data Movement28% of the exam*0 of 7 tried
Performance Optimization19% of the exam*0 of 3 tried
Storage and Data Protection14% of the exam*0 of 3 tried
Data Governance14% of the exam*0 of 2 tried
Data Transformation25% of the exam*0 of 7 tried
* Our estimate. Snowflake publishes no section weights.
3 · Keep going
Ready for more? Take a weighted mock or try free practice questions.