apache/seatunnel · error · FileConnectorException

FORMAT_NOT_SUPPORT

FORMAT_NOT_SUPPORT

Error message

SeaTunnel does not supported this file format: [<fileFormat>]

What it means

parseCatalogTable in BaseFileSourceConfig resolves a read strategy from the configured file_format and builds a CatalogTable. If the file format is not one of the formats the connector knows how to read, the switch's default branch throws FileConnectorException with FORMAT_NOT_SUPPORT.

Source

Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/config/BaseFileSourceConfig.java:195

            case JSON:
            case EXCEL:
            case XML:
                readStrategy.setCatalogTable(catalogTable);
                return newCatalogTable(catalogTable, readStrategy.getActualSeaTunnelRowTypeInfo());
            case ORC:
            case PARQUET:
            case BINARY:
                return newCatalogTable(
                        catalogTable,
                        readStrategy.getSeaTunnelRowTypeInfoWithUserConfigRowType(
                                filePaths.get(0),
                                configSchema ? catalogTable.getSeaTunnelRowType() : null));
            case MARKDOWN:
            case PDF:
                return newCatalogTable(
                        catalogTable, readStrategy.getSeaTunnelRowTypeInfo(filePaths.get(0)));
            default:
                throw new FileConnectorException(
                        FileConnectorErrorCode.FORMAT_NOT_SUPPORT,
                        "SeaTunnel does not supported this file format: [" + fileFormat + "]");
        }
    }

    /** Returns whether Markdown document routing and Knowledge Sync metadata are enabled. */
    private boolean isMarkdownKnowledgeSyncMetadataEnabled(ReadonlyConfig readonlyConfig) {
        return fileFormat == FileFormat.MARKDOWN
                && readonlyConfig.get(FileBaseSourceOptions.MARKDOWN_RAG_METADATA_ENABLED);
    }

    private SeaTunnelRowType getSchemaForEmptyFilePath(ReadonlyConfig readonlyConfig) {
        String rootPath = readonlyConfig.get(FileBaseSourceOptions.FILE_PATH);
        return readStrategy.getSeaTunnelRowTypeInfo(rootPath);
    }

    private static String maskUriUserInfo(String rawPath) {
        if (rawPath == null) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Change file_format to a readable format (e.g. text, csv, json, parquet, orc, excel, markdown) for source jobs.
  2. If the data is canal/debezium/maxwell JSON, use a CDC connector (e.g. MySQL-CDC) instead of a file source.
  3. Check the FileFormat enum for the exact supported format names and fix typos.
  4. Upgrade SeaTunnel if support for the format was added in a newer release.

Example fix

// before
file {
  format = "canal_json"
}
// after
file {
  format = "json"
}
Defensive patterns

Strategy: validation

Validate before calling

Set<String> READABLE_FORMATS = Set.of("text","csv","json","parquet","orc","excel","markdown");
String fmt = config.get("file_format");
if (!READABLE_FORMATS.contains(fmt)) {
    throw new IllegalArgumentException("file_format '" + fmt + "' is not readable by a file source");
}

Try / catch

try {
    parseCatalogTable(readonlyConfig);
} catch (FileConnectorException e) {
    if (FileConnectorErrorCode.FORMAT_NOT_SUPPORT.equals(e.getSeaTunnelErrorCode())) {
        throw new IllegalArgumentException("Use a readable file_format: " + e.getMessage(), e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Setting a file_format in the file source config that has no read branch in parseCatalogTable (i.e. a write-only format like canal_json/debezium_json/maxwell_json, or an unrecognized format value).

Common situations: Using a CDC JSON format (canal_json, debezium_json, maxwell_json) as a file source — these only support writing; misspelled file_format values; config copied from a sink into a source job.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/e8c7d3d2f6c906dc. Report an issue: GitHub.