apache/seatunnel · error · FileConnectorException
UNSUPPORTED_OPERATION
UNSUPPORTED_OPERATION
Error message
SeaTunnel does not support user-defined schema for [parquet, orc, binary] files
What it means
Columnar and binary file formats (PARQUET, ORC, BINARY) carry their own schema, so SeaTunnel forbids declaring a user-defined `schema` block in the source config for them. BaseFileSource raises UNSUPPORTED_OPERATION as soon as it sees schema config combined with one of these formats.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/source/BaseFileSource.java:118
}
// support user-defined schema
CatalogTable userDefinedCatalogTable;
// only json text csv type support user-defined schema now
if (pluginConfig.getOptional(ConnectorCommonOptions.SCHEMA).isPresent()) {
switch (fileFormat) {
case CSV:
case TEXT:
case JSON:
case EXCEL:
case XML:
userDefinedCatalogTable = CatalogTableUtil.buildWithConfig(pluginConfig);
readStrategy.setCatalogTable(userDefinedCatalogTable);
break;
case ORC:
case PARQUET:
case BINARY:
throw new FileConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION,
"SeaTunnel does not support user-defined schema for [parquet, orc, binary] files");
default:
// never got in there
throw new FileConnectorException(
CommonErrorCodeDeprecated.ILLEGAL_ARGUMENT,
"SeaTunnel does not supported this file format");
}
} else {
if (filePaths.isEmpty()) {
userDefinedCatalogTable = buildCatalogTableForEmptyPath(path, fileFormat);
} else {
try {
SeaTunnelRowType rowType =
readStrategy.getSeaTunnelRowTypeInfo(filePaths.get(0));
userDefinedCatalogTable = CatalogTableUtil.getCatalogTable("default", rowType);
} catch (FileConnectorException e) {
String errorMsg =View on GitHub (pinned to cf67b549a7)
Solutions
- Remove the `schema` option from the source config when using parquet, orc, or binary.
- Let the connector read the schema embedded in the parquet/ORC file.
- If you need explicit typing, switch the format to json/text/csv which support user-defined schema.
- Resubmit the job after the config change.
Example fix
// before
file_format_type = parquet
schema = { fields { id bigint } }
// after
file_format_type = parquet Defensive patterns
Strategy: validation
Validate before calling
String fmt = config.getString("file_format_type");
boolean schemaDefined = config.getConfigMap("schema") != null && !config.getConfigMap("schema").isEmpty();
if (schemaDefined && ("parquet".equals(fmt) || "orc".equals(fmt) || "binary".equals(fmt))) {
throw new IllegalArgumentException("schema is not supported for file_format_type=" + fmt);
} Try / catch
try {
// build source
} catch (FileConnectorException e) {
if (CommonErrorCodeDeprecated.UNSUPPORTED_OPERATION.equals(e.getErrorCode())) {
throw new IllegalStateException("Remove the schema block for parquet/orc/binary sources", e);
}
throw e;
} Prevention
- Only add schema blocks to text/csv/json sources.
- Lint configs: schema + parquet/orc/binary should fail config validation.
- Read format docs before switching file_format_type.
When it happens
Trigger: Configuring a file source with file_format_type = parquet, orc, or binary together with a `schema = { ... }` option; BaseFileSource.java:118 throws during source initialization.
Common situations: Copy-pasting a JSON/CSV config and changing only the format to parquet/orc; users migrating configs from text-based formats; misunderstanding that schema is only for schemaless formats.
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
- Schema config can not be empty
- Schema config need option [schema], please correct your conf
- Schema config can't contains both [fields] and [columns], pl
- INVALID_PRIMARY_KEY
- TABLE_SCHEMA_GET_FAILED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/e25c42e8cd0319c0.
Report an issue: GitHub.