apache/seatunnel · error · SeaTunnelCsvFormatException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
SeaTunnel array not support this data type [${sqlType}] What it means
When converting a CSV array column, CsvDeserializationSchema maps each element to the declared SeaTunnel element type. If the element SqlType has no array-conversion branch (e.g. MAP, nested ARRAY, ROW), it throws SeaTunnelCsvFormatException with UNSUPPORTED_DATA_TYPE because element-wise conversion is only implemented for primitive types.
Source
Thrown at seatunnel-formats/seatunnel-format-csv/src/main/java/org/apache/seatunnel/format/csv/CsvDeserializationSchema.java:272
return objectArrayList.toArray(new Integer[0]);
case BIGINT:
return objectArrayList.toArray(new Long[0]);
case FLOAT:
return objectArrayList.toArray(new Float[0]);
case DOUBLE:
return objectArrayList.toArray(new Double[0]);
case DECIMAL:
return objectArrayList.toArray(new BigDecimal[0]);
case DATE:
return objectArrayList.toArray(new LocalDate[0]);
case TIME:
return objectArrayList.toArray(new LocalTime[0]);
case TIMESTAMP:
return objectArrayList.toArray(new LocalDateTime[0]);
case TIMESTAMP_TZ:
return objectArrayList.toArray(new OffsetDateTime[0]);
default:
throw new SeaTunnelCsvFormatException(
CommonErrorCode.UNSUPPORTED_DATA_TYPE,
String.format(
"SeaTunnel array not support this data type [%s]",
elementType.getSqlType()));
}
case MAP:
SeaTunnelDataType<?> keyType = ((MapType<?, ?>) fieldType).getKeyType();
SeaTunnelDataType<?> valueType = ((MapType<?, ?>) fieldType).getValueType();
LinkedHashMap<Object, Object> objectMap = new LinkedHashMap<>();
String[] kvs = field.split(separators[level + 1]);
for (String kv : kvs) {
String[] splits = kv.split(separators[level + 2]);
if (splits.length < 2) {
objectMap.put(convert(splits[0], keyType, level + 1, fieldName), null);
} else {
objectMap.put(
convert(splits[0], keyType, level + 1, fieldName),
convert(splits[1], valueType, level + 1, fieldName));View on GitHub (pinned to cf67b549a7)
Solutions
- Change the array element type in the schema to a supported primitive (INT, BIGINT, STRING, BOOLEAN, DOUBLE, DATE, TIME, TIMESTAMP).
- Flatten nested structures: encode MAP/ROW fields as JSON strings and parse downstream.
- Switch the source format to JSON/Parquet if nested types are genuinely required.
Example fix
// before
field = {name = "tags", type = "array<map<string,string>>"}
// after
field = {name = "tags", type = "array<string>"} Defensive patterns
Strategy: validation
Validate before calling
Arrays.stream(rowType.getFieldTypes()) .filter(t -> t instanceof ArrayType) .map(t -> ((ArrayType) t).getElementType().getSqlType()) .forEach(t -> checkSupported(t)); // only primitives allowed
Try / catch
try { deserialize(record); } catch (SeaTunnelCsvFormatException e) { if (e.getCode() == UNSUPPORTED_DATA_TYPE) { /* fix schema or skip row */ } } Prevention
- Keep array element types primitive in CSV schemas
- Validate schema before job submission
- Use JSON/Parquet for nested data
When it happens
Trigger: Declaring a CSV column as array<MAP<...>>, array<array<...>>, or another non-primitive element type in the source schema; schema in config lists an element SqlType not in the supported set (INT, STRING, DATE, TIME, TIMESTAMP, etc.).
Common situations: Copy-pasting schema definitions from JSON/Parquet sources into a CSV source; trying to model nested data in flat CSV files.
Related errors
- Unsupported type:
- UNSUPPORTED_DATA_TYPE
- Unsupported SQL type:
- Unsupported BYTES value type:
- Vitess CDC bootstrap schema does not support catalog SQL typ
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/52775e56319818d2.
Report an issue: GitHub.