apache/seatunnel · error · ClickhouseConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
data type in array is not supported: {} What it means
TypeConvertUtil.convert maps ClickHouse column types to SeaTunnel types; when the column is an array whose element type is not one of the supported primitives (INT, LONG, FLOAT, DOUBLE, SHORT, BOOLEAN, BYTE), it throws UNSUPPORTED_DATA_TYPE. Arrays of strings, decimals, dates, or nested arrays are not convertible by this utility.
Source
Thrown at seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/util/TypeConvertUtil.java:64
SeaTunnelDataType<?> dataType = convert(subArrayDataType);
if (BasicType.INT_TYPE.equals(dataType)) {
return ArrayType.INT_ARRAY_TYPE;
} else if (BasicType.STRING_TYPE.equals(dataType)) {
return ArrayType.STRING_ARRAY_TYPE;
} else if (BasicType.FLOAT_TYPE.equals(dataType)) {
return ArrayType.FLOAT_ARRAY_TYPE;
} else if (BasicType.DOUBLE_TYPE.equals(dataType)) {
return ArrayType.DOUBLE_ARRAY_TYPE;
} else if (BasicType.LONG_TYPE.equals(dataType)) {
return ArrayType.LONG_ARRAY_TYPE;
} else if (BasicType.SHORT_TYPE.equals(dataType)) {
return ArrayType.SHORT_ARRAY_TYPE;
} else if (BasicType.BOOLEAN_TYPE.equals(dataType)) {
return ArrayType.BOOLEAN_ARRAY_TYPE;
} else if (BasicType.BYTE_TYPE.equals(dataType)) {
return ArrayType.BYTE_ARRAY_TYPE;
} else {
throw new ClickhouseConnectorException(
CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
"data type in array is not supported: " + subArrayDataType.getDataType());
}
}
Class<?> type = column.getDataType().getObjectClass();
if (Integer.class.equals(type)) {
return BasicType.INT_TYPE;
} else if (Long.class.equals(type)) {
return BasicType.LONG_TYPE;
} else if (Short.class.equals(type)) {
return BasicType.SHORT_TYPE;
} else if (Byte.class.equals(type)) {
return BasicType.BYTE_TYPE;
} else if (Boolean.class.equals(type)) {
return BasicType.BOOLEAN_TYPE;
} else if (LocalDate.class.equals(type)) {
return LocalTimeType.LOCAL_DATE_TYPE;
} else if (LocalDateTime.class.equals(type)) {View on GitHub (pinned to cf67b549a7)
Solutions
- Exclude the unsupported array column from the read schema (select only supported columns).
- Cast the column to a supported type in ClickHouse (e.g. materialize Array(String) via arrayJoin or read as a single string) or change the table schema.
- Upgrade SeaTunnel to a version whose TypeConvertUtil supports the element type (String arrays and more were added in later releases).
- Implement a custom conversion by extending the connector if the data is essential.
Example fix
// before
schema = { columns = { tags = "array<string>" } } // Array(String) unsupported here
// after
schema = { columns = { tags_joined = "string" } } // read arrayToString(tags) or drop the column Defensive patterns
Strategy: validation
Validate before calling
// ensure every array column's element type is a supported primitive before reading
schema.getColumns().forEach(col -> {
if (isClickhouseArray(col) && !SUPPORTED_ELEMENT_TYPES.contains(elementTypeOf(col))) {
throw new IllegalArgumentException("unsupported array element: " + col);
}
}); Try / catch
try {
SeaTunnelDataType<?> t = TypeConvertUtil.convert(column);
} catch (ClickhouseConnectorException e) {
LOG.warn("skipping column with unsupported array element type");
columns.remove(column); // fallback: drop the column
} Prevention
- Avoid Array(<non-numeric-primitive>) columns in tables read by this connector, or cast them at query time.
- Check the connector docs' supported-type matrix before modeling array columns.
- Prefer flattening arrays with arrayJoin into supported scalar types.
When it happens
Trigger: Reading a ClickHouse column like Array(String), Array(Decimal), Array(Date), or Array(Array(Int)) where the element type has no BasicType mapping in TypeConvertUtil.convert.
Common situations: ClickHouse tables using Array(String) — very common — being read with this connector version; nested array columns; schema discovered from the table includes an array column the reader can't map.
Related errors
- array inject error, unsupported data type: " + type
- COMMON-19
- Unsupported type in LocalTimeArrayType: ${eleSqlType}
- UNSUPPORTED_DATA_TYPE
- Unsupported SQL type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/ba1f31587d2997e7.
Report an issue: GitHub.