apache/seatunnel · error · FileConnectorException
COMMON_UNSUPPORTED_DATA_TYPE
COMMON_UNSUPPORTED_DATA_TYPE
Error message
User defined schema validation failed
What it means
ExcelCellUtils.convert maps SeaTunnel schema field types to Java values when reading Excel. If the declared schema contains a field type the converter does not handle (anything beyond the known cases like STRING, INT, DATE, ROW, BYTES, etc.), the default branch throws FileConnectorException with UNSUPPORTED_DATA_TYPE.
Source
Thrown at seatunnel-connectors-v2/connector-file/connector-file-base/src/main/java/org/apache/seatunnel/connectors/seatunnel/file/excel/ExcelCellUtils.java:146
return (byte) Double.parseDouble(fieldValue);
case SMALLINT:
return (short) Double.parseDouble(fieldValue);
case DECIMAL:
return BigDecimal.valueOf(Double.parseDouble(fieldValue));
case DATE:
return parseDate(field, fieldType);
case TIME:
return parseTime(field, fieldType);
case TIMESTAMP:
return parseTimestamp(field, fieldType);
case NULL:
return null;
case BYTES:
return fieldValue.getBytes(StandardCharsets.UTF_8);
case ROW:
return parseRow(fieldValue, fieldType);
default:
throw new FileConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
"User defined schema validation failed");
}
}
private Object parseDate(Object fieldValue, SeaTunnelDataType<?> fieldType) {
if (fieldValue instanceof LocalDateTime) {
return ((LocalDateTime) fieldValue).toLocalDate();
}
return LocalDate.parse(fieldValue.toString(), dateFormatter);
}
private Object parseTime(Object fieldValue, SeaTunnelDataType<?> fieldType) {
if (fieldValue instanceof LocalDateTime) {
return ((LocalDateTime) fieldValue).toLocalTime();
}
return LocalTime.parse(fieldValue.toString(), timeFormatter);
}View on GitHub (pinned to cf67b549a7)
Solutions
- Simplify the user-defined schema for the Excel source to scalar types (string, int, bigint, double, boolean, date, timestamp)
- Change complex-typed columns to string and parse them downstream in a transform
- Check the SeaTunnel version; upgrade to a release where the Excel converter supports the needed type
Example fix
// before
schema = {
fields {
tags = "array<string>"
}
}
// after
schema = {
fields {
tags = "string"
}
} Defensive patterns
Strategy: validation
Validate before calling
schema.getFieldTypes().forEach(t -> {
if (!(t instanceof BasicType || t == LocalTimeType.LOCAL_DATE || t == LocalTimeType.LOCAL_TIME || t == LocalTimeType.LOCAL_DATE_TIME)) {
throw new IllegalArgumentException("Excel source supports only scalar field types, got: " + t);
}
}); Prevention
- Keep Excel schemas to scalar types only
- Avoid array/map/row types in Excel user-defined schemas
When it happens
Trigger: Reading an Excel file with a user-defined schema (schema = { fields { ... } }) containing a field whose SeaTunnelDataType has no conversion branch in ExcelCellUtils.convert, e.g. MAP, ARRAY, or a nested complex type in a cell value.
Common situations: Declaring a schema with complex types (arrays/maps) for Excel columns; schema drift after upgrading SeaTunnel where a type was added upstream but not to the Excel converter; typo-driven type inference producing an unexpected type.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- Operator %s requires a compareOption (cross-field comparison
- Operator %s requires an expectValue, but expectValue is null
- Operator EXTENSION requires a non-null ConditionExtension
- UNSUPPORTED_DATA_TYPE
- prepare method is not supported
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/94a273c540768b07.
Report an issue: GitHub.