apache/seatunnel · error · IotdbConnectorException
UNSUPPORTED_DATA_TYPE
UNSUPPORTED_DATA_TYPE
Error message
Unsupported data type:
What it means
Thrown by addValuesToTablet when a SeaTunnel column's data type is not one of the IoTDB tablet-supported types handled by the switch (e.g. MAP, ARRAY, or an unexpected SeaTunnelType). The sink cannot map the SeaTunnel type to an IoTDB data type, so the batch write aborts. This is a schema incompatibility between the upstream catalog/table and IoTDB.
Source
Thrown at seatunnel-connectors-v2/connector-iotdb-v2/src/main/java/org/apache/seatunnel/connectors/seatunnel/iotdbv2/sink/relational/IoTDBv2RelationalSinkClient.java:189
break;
case FLOAT:
tablet.addValue(rowIndex, columnIndex++, (Float) fieldValue);
break;
case DOUBLE:
tablet.addValue(rowIndex, columnIndex++, (Double) fieldValue);
break;
case BOOLEAN:
tablet.addValue(rowIndex, columnIndex++, (Boolean) fieldValue);
break;
case TEXT:
case STRING:
tablet.addValue(rowIndex, columnIndex++, (String) fieldValue);
break;
case DATE:
tablet.addValue(rowIndex, columnIndex++, LocalDate.parse((String) fieldValue));
break;
default:
throw new IotdbConnectorException(
CommonErrorCode.UNSUPPORTED_DATA_TYPE,
"Unsupported data type: " + columnDataTypes.get(tagNAttributeSize + i));
}
}
}
public synchronized void close() throws IOException {
try {
flush();
} finally {
try {
if (tableSession != null) {
tableSession.close();
}
} catch (IoTDBConnectionException e) {
log.error("Close IoTDB client failed.", e);
}
}View on GitHub (pinned to cf67b549a7)
Solutions
- Cast or drop unsupported columns before the IoTDB sink (use a transform: replace/map complex types to STRING)
- Check the column type list printed in the error and align the sink's schema with supported IoTDB types
- Upgrade SeaTunnel if a newer version added mappings for that type
- File/patch a case in addValuesToTablet if the type is representable (e.g. serialize ROW to JSON string)
Example fix
// before // passing MAP column "tags" straight into the IoTDB sink // after // add a transform to serialize: // Transform: Jsonify fields=["tags"] (or Cast tags -> STRING)
Defensive patterns
Strategy: validation
Validate before calling
Set<String> supported = Set.of("STRING","BOOLEAN","TINYINT","SMALLINT","INT","BIGINT","FLOAT","DOUBLE","TIMESTAMP","DATE");
for (SeaTunnelDataType<?> t : rowType.getFieldTypes()) {
if (!supported.contains(t.getSqlType().name())) {
throw new IllegalArgumentException("Cast/drop column of type " + t.getSqlType() + " before IoTDB sink");
}
} Try / catch
try {
sinkClient.write(records);
} catch (IotdbConnectorException e) {
if (CommonErrorCode.UNSUPPORTED_DATA_TYPE.equals(e.getSeaTunnelErrorCode())) {
// transform or drop offending column, then restart pipeline
}
throw e;
} Prevention
- Define an explicit sink schema with only IoTDB-supported scalar types
- Insert a transform (Cast/Jsonify) for complex types before the sink
- Pin and review schema contracts between source and sink in CI
- Re-check type mapping docs after SeaTunnel upgrades
When it happens
Trigger: The SeaTunnel table row contains a column whose SeaTunnelType falls into the default branch — typically complex types (MAP/ARRAY/ROW) or an unmapped type — while building the Tablet for insert.
Common situations: Source table includes JSON/array/map columns that were passed through unconverted; a catalog version bump added a new type the IoTDB sink doesn't handle; schema drift upstream added a new column type.
Related errors
- UNSUPPORTED_DATA_TYPE
- Unsupported to derive Schema for type: ${dataType}
- UNSUPPORTED_DATA_TYPE
- UNSUPPORTED_DATA_TYPE
- Unsupported type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/91236e7299c17878.
Report an issue: GitHub.