MetricSign
EN|NLRequest Access
Medium severitydata_quality

Power BI Refresh Error:
INFER_SCHEMA_FAILURE

What does this error mean?

The Snowflake INFER_SCHEMA function could not determine column definitions from staged files because the files are empty, corrupt, in an unsupported format, or inaccessible on the stage.

Common causes

  • 1One or more staged files are empty or contain only headers with no data rows
  • 2The file format specified does not match the actual file structure (e.g., Parquet file with a CSV format object)
  • 3The stage path pattern matches no files — the files were not uploaded or were placed in a different path
  • 4The files are compressed with a codec that the file format object does not specify

How to fix it

  1. 1Step 1: Run LIST @your_stage_name PATTERN='.*your_pattern.*' to confirm files are present at the expected path.
  2. 2Step 2: Verify the FILE FORMAT object type matches the actual file type (TYPE = PARQUET, JSON, CSV, etc.).
  3. 3Step 3: Check that at least one file has data rows, not just a header.
  4. 4Step 4: If using a LIMIT clause, remove it temporarily to see if schema detection succeeds with the full dataset.
  5. 5Step 5: Re-upload the files and retry INFER_SCHEMA.

Frequently asked questions

Can INFER_SCHEMA handle mixed-type columns across files?

INFER_SCHEMA samples files and votes on the most likely type per column. Conflicting types across files can cause the function to fall back to VARCHAR. Use the IGNORE_CASE and MAX_RECORDS_PER_FILE options to improve accuracy.

Is there a way to preview what schema INFER_SCHEMA would produce before using it?

Yes — SELECT * FROM TABLE(INFER_SCHEMA(LOCATION=>'@your_stage', FILE_FORMAT=>'your_format')) returns the detected column names and types without creating any table.

Other data_quality errors