apache/seatunnel · error · org.apache.seatunnel.common.exception.SeaTunnelRuntimeException
COMMON-19
COMMON-19
Error message
'<identifier>' unsupported convert SeaTunnel data type '<dataType>' of '<field>' to connector data type.
What it means
TiDB JDBC catalog failed to map a SeaTunnel data type back to a TiDB (MySQL-protocol) connector type. TiDBDataTypeConvertor.toConnectorType delegates to the MySQL convertor; when that throws CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE it is re-wrapped with the TiDB dialect name, the SqlType name, and the field.
Solutions
- Convert the offending field to a supported type (e.g. STRING/JSON) via a transform before the TiDB sink
- Upgrade SeaTunnel to a version with broader MySQL/TiDB type mapping
- Extend the MySQL convertor's toConnectorType switch to handle the missing SqlType
Example fix
// before: writing a MAP field to TiDB sink SeaTunnelRow fields contain MapType.STRING_MAP_TYPE column // after: flatten or stringify the map first, e.g. to STRING via JSON transform
Defensive patterns
Strategy: validation
Validate before calling
for (SeaTunnelColumn col : columns) {
switch (col.getDataType().getSqlType()) {
case MAP: case ARRAY: case ROW:
throw new IllegalArgumentException("Column '" + col.getName() + "' type " + col.getDataType().getSqlType() + " not writable to TiDB; convert to STRING/JSON first");
default: break;
}
} Try / catch
try {
return tidbConvertor.toConnectorType(field, dataType, props);
} catch (SeaTunnelRuntimeException e) {
if (CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE.equals(e.getSeaTunnelErrorCode())) {
log.warn("Falling back to STRING type for TiDB field {}", field);
return BasicType.STRING_TYPE;
}
throw e;
} Prevention
- Pre-validate catalog schemas so complex types are serialized to STRING/JSON before TiDB sinks
- Pre-create target tables with explicit DDL instead of relying on auto table creation
- Add unit tests over the pipeline schema against the TiDB convertor before deploying
When it happens
Trigger: Calling TiDBDataTypeConvertor.toConnectorType(field, seaTunnelDataType, dataTypeProperties) with a SeaTunnel SqlType the MySQL convertor cannot express (e.g. MAP, ARRAY, bytes variants unsupported by the dialect).
Common situations: Sink-side type conversion when upstream sources produce complex types TiDB sink can't express; auto table creation for TiDB with unsupported column types; version drift between SeaTunnel type system and dialect support.
Related errors
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/e8695191fd6e8db9.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/tidb/TiDBDataTypeConvertor.java:112
e.getSeaTunnelErrorCode())) {
throw CommonError.convertToSeaTunnelTypeError(
DatabaseIdentifier.TIDB, mysqlType.getName(), field);
}
throw e;
}
}
@Override
public MysqlType toConnectorType(
String field,
SeaTunnelDataType<?> seaTunnelDataType,
Map<String, Object> dataTypeProperties) {
try {
return MYSQL_CONVERTOR.toConnectorType(field, seaTunnelDataType, dataTypeProperties);
} catch (SeaTunnelRuntimeException e) {
if (CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE.equals(
e.getSeaTunnelErrorCode())) {
throw CommonError.convertToConnectorTypeError(
DatabaseIdentifier.TIDB, seaTunnelDataType.getSqlType().name(), field);
}
throw e;
}
}
@Override
public String getIdentity() {
return DatabaseIdentifier.TIDB;
}
}
View on GitHub (pinned to cf67b549a7)