Medium severityexecution
Power BI Refresh Error:
COPY INTO (File Format Error)
What does this error mean?
Snowflake rejected one or more files during COPY INTO because the file content does not match the specified file format options (delimiter, header, encoding, date format, etc.).
Common causes
- 1CSV delimiter in the file does not match the FILE_FORMAT option (e.g., pipe-delimited file loaded with comma delimiter)
- 2File has a header row but SKIP_HEADER is not set, causing the first row to be treated as data
- 3Date or timestamp values in the file use a format not matching the DATE_FORMAT or TIMESTAMP_FORMAT option
- 4File encoding (UTF-16, Latin-1) does not match the ENCODING option
- 5A quoted field contains the delimiter character and FIELD_OPTIONALLY_ENCLOSED_BY is not configured
How to fix it
- 1Use COPY INTO with VALIDATION_MODE = 'RETURN_ERRORS' to see exactly which rows fail and why without loading any data
- 2Inspect the file format: run DESC FILE FORMAT my_format to confirm options match the actual file structure
- 3Set SKIP_HEADER = 1 if the CSV has a header row
- 4Add or correct FIELD_DELIMITER, DATE_FORMAT, TIMESTAMP_FORMAT, and ENCODING options in the file format
- 5For one-off loads, specify format options inline in the COPY INTO statement rather than relying on a named file format