apache/seatunnel · error · SeaTunnelJsonFormatException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Unsupported type: ${type} What it means
JsonToRowConverters.createNotNullConverter maps each SeaTunnel data type to a JSON-to-row converter; there is no converter registered for the type being converted, so the switch hits its default branch and throws SeaTunnelJsonFormatException with UNSUPPORTED_DATA_TYPE. This means the row type contains a data type (SqlType) the JSON format cannot deserialize.
Source
Thrown at seatunnel-formats/seatunnel-format-json/src/main/java/org/apache/seatunnel/format/json/JsonToRowConverters.java:217
public Object convert(JsonNode jsonNode, String fieldName) {
return convertToBigDecimal(jsonNode);
}
};
case FLOAT_VECTOR:
return new JsonToObjectConverter() {
@Override
public Object convert(JsonNode jsonNode, String fieldName) {
return convertToFloatVector(jsonNode, fieldName);
}
};
case ARRAY:
return createArrayConverter((ArrayType<?, ?>) type);
case MAP:
return createMapConverter((MapType<?, ?>) type);
case ROW:
return createRowConverter((SeaTunnelRowType) type);
default:
throw new SeaTunnelJsonFormatException(
CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
"Unsupported type: " + type);
}
}
private boolean convertToBoolean(JsonNode jsonNode) {
if (jsonNode.isBoolean()) {
// avoid redundant toString and parseBoolean, for better performance
return jsonNode.asBoolean();
} else {
return Boolean.parseBoolean(jsonNode.asText().trim());
}
}
private int convertToInt(JsonNode jsonNode) {
if (jsonNode.canConvertToInt()) {
// avoid redundant toString and parseInt, for better performance
return jsonNode.asInt();View on GitHub (pinned to cf67b549a7)
Solutions
- Check which field type is unsupported (the message prints it) and change the schema to a JSON-supported type (e.g. STRING, ARRAY<FLOAT>, MAP, ROW).
- Upgrade seatunnel-format-json / SeaTunnel to a version whose JsonToRowConverters supports the type.
- If the type is genuinely unsupported, file/patch a converter in JsonToRowConverters.createNotNullConverter.
Example fix
// before
SeaTunnelRowType type = new SeaTunnelRowType(new String[]{"v"}, new SeaTunnelDataType[]{BytesType.INSTANCE}); // unsupported
// after
SeaTunnelRowType type = new SeaTunnelRowType(new String[]{"v"}, new ArrayType<>(FloatType.INSTANCE)); // FLOAT_VECTOR array Defensive patterns
Strategy: validation
Validate before calling
for (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {
switch (t.getSqlType()) {
case STRING: case BOOLEAN: case TINYINT: case SMALLINT: case INT: case BIGINT:
case FLOAT: case DOUBLE: case DATE: case TIME: case TIMESTAMP:
case ARRAY: case MAP: case ROW: case FLOAT_VECTOR:
break;
default:
throw new IllegalArgumentException("JSON format cannot handle type: " + t.getSqlType());
}
} Type guard
static boolean isJsonSupported(SeaTunnelDataType<?> t) {
switch (t.getSqlType()) {
case ARRAY: case MAP: case ROW: case FLOAT_VECTOR:
case STRING: case BOOLEAN: case TINYINT: case SMALLINT: case INT:
case BIGINT: case FLOAT: case DOUBLE: case DATE: case TIME: case TIMESTAMP:
return true;
default:
return false;
}
} Try / catch
try {
converter = new JsonToRowConverters().createConverter(rowType);
} catch (SeaTunnelJsonFormatException e) {
throw new IllegalArgumentException("Unsupported field type for JSON format: " + e.getMessage(), e);
} Prevention
- Keep SeaTunnel API and format module versions in lock-step (same release) to avoid unsupported new types.
- Validate the declared schema types against JSON-format support before job submission.
- Avoid exotic column types (BYTES, custom types) in JSON-format sources.
When it happens
Trigger: A source/sink declares a SeaTunnelRowType whose field type's SqlType falls outside STRING/BOOLEAN/TINYINT..DOUBLE/DATE/TIME/TIMESTAMP/ARRAY/MAP/ROW/FLOAT_VECTOR — e.g. a custom or newly added SqlType, or a BYTES/NULL type — and the JSON deserializer builds converters for it.
Common situations: New data types added to the API but not yet supported by the JSON format (version skew between seatunnel-api and seatunnel-format-json); connectors passing exotic catalog column types into a JSON format schema.
Related errors
- Unsupported type:
- UNSUPPORTED_DATA_TYPE
- Could not find field with name ${fieldName} .
- COMMON-02
- Unsupported SQL type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/9f8a83474372b2a6.
Report an issue: GitHub.