apache/iceberg · error · ValidationException

Do not support file format in path %s

Error message

Do not support file format in path %s

What it means

determineFileFormatFromPath only recognizes paths ending in .parquet; any other file suffix found in the Delta log actions cannot be mapped to an Iceberg FileFormat and aborts with this ValidationException.

Source

Thrown at delta-lake/src/main/java/org/apache/iceberg/delta/BaseSnapshotDeltaLakeTableAction.java:407

        spec.fields().stream()
            .map(PartitionField::name)
            .map(partitionValues::get)
            .collect(Collectors.toList());

    return DataFiles.builder(spec)
        .withPath(fullFilePath)
        .withFormat(format)
        .withFileSizeInBytes(fileSize)
        .withMetrics(metrics)
        .withPartitionValues(partitionValueList)
        .build();
  }

  private FileFormat determineFileFormatFromPath(String path) {
    if (path.endsWith(PARQUET_SUFFIX)) {
      return FileFormat.PARQUET;
    } else {
      throw new ValidationException("Do not support file format in path %s", path);
    }
  }

  private Metrics getMetricsForFile(
      InputFile file, FileFormat format, MetricsConfig metricsSpec, NameMapping mapping) {
    if (format == FileFormat.PARQUET) {
      return ParquetUtil.fileMetrics(file, metricsSpec, mapping);
    }
    throw new ValidationException("Cannot get metrics from file format: %s", format);
  }

  private Map<String, String> destTableProperties(
      io.delta.standalone.Snapshot deltaSnapshot, String originalLocation) {
    additionalPropertiesBuilder.putAll(deltaSnapshot.getMetadata().getConfiguration());
    additionalPropertiesBuilder.putAll(
        ImmutableMap.of(
            SNAPSHOT_SOURCE_PROP, DELTA_SOURCE_VALUE, ORIGINAL_LOCATION_PROP, originalLocation));

View on GitHub (pinned to 86d9c8fc54)

Solutions

  1. Inspect the offending path in the message; confirm whether it is a genuine data file with a non-parquet extension.
  2. Rename/rewrite the data files with a .parquet suffix (e.g. by rewriting the Delta table) and rerun the migration.
  3. Extend determineFileFormatFromPath to map additional extensions only if your Delta writer truly emits another format that Iceberg supports (e.g. ORC/Avro mapping to ParquetUtil equivalents).
  4. Exclude non-data files from the action set before conversion.

Example fix

// before
throw new ValidationException("Do not support file format in path %s", path);
// after
if (path.endsWith(".orc")) {
  return FileFormat.ORC;
}
throw new ValidationException("Do not support file format in path %s", path);
Defensive patterns

Strategy: validation

Validate before calling

if (!addFile.getPath().endsWith(".parquet")) {
  throw new IllegalStateException("Non-parquet Delta file: " + addFile.getPath());
}

Try / catch

try {
  snapshotTable.execute();
} catch (ValidationException e) {
  // parse path from message; rewrite/rename non-parquet files
}

Prevention

When it happens

Trigger: A Delta log AddFile/RemoveFile entry whose path does not end with '.parquet' — e.g. files written with a different extension, checkpoint/metadata files wrongly passed through, or custom Delta writers using non-parquet formats.

Common situations: Delta tables produced by writers that used custom file extensions; migrated data retaining legacy extensions (e.g. .snappy.parquet is fine but .avro is not); accidentally including non-data entries in the action set.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/iceberg@86d9c8fc54 (2026-09-12). Data as JSON: /api/errors/4ac31f0db5fba49b. Report an issue: GitHub.