VALIDATE lets you test staged files with COPY INTO before loading them, returning rows that would fail.
Running COPY INTO with VALIDATION_MODE shows row-level errors without touching destination tables, helping you fix bad files faster.
Set VALIDATION_MODE to 'RETURN_ERRORS'
, 'RETURN_ALL_ERRORS'
, or 'RETURN_LIMIT n'
. Snowflake scans the staged files and returns error details such as line number, column position, and reason.
Typical issues include missing columns, datatype mismatches, quotation problems, and un-escaped delimiters—exactly the problems that break ecommerce order feeds.
No.VALIDATION_MODE only returns failing rows. Use a temporary table plus COPY INTO for sampling good data if needed.
Edit source CSVs, adjust COPY options (FIELD_OPTIONALLY_ENCLOSED_BY, SKIP_HEADER, NULL_IF), or cast columns explicitly in a SELECT stage transform.
1. Automate VALIDATE in CI jobs.
2. Fail fast on error counts > 0.
3. Version raw files in S3/GCS.
4. Log VALIDATION_MODE='RETURN_ERRORS'
output for auditing.
.
Yes, COPY INTO with validation still scans files, so it consumes compute but avoids table writes.
Absolutely. Snowflake automatically decompresses gzip files and understands parquet. Just point to the stage and set FILE_FORMAT accordingly.
Yes. Wrap the COPY INTO statement in a Task or use it during pipe debugging to ensure stream safety before continuous loads.