{"record":{"id":"e8695191fd6e8db9","repo":"apache/seatunnel","slug":"common-19-e86951","errorCode":"COMMON-19","errorMessage":"'<identifier>' unsupported convert SeaTunnel data type '<dataType>' of '<field>' to connector data type.","messagePattern":"'<identifier>' unsupported convert SeaTunnel data type '<dataType>' of '<field>' to connector data type\\.","errorType":"error_code","errorClass":"org.apache.seatunnel.common.exception.SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/tidb/TiDBDataTypeConvertor.java","lineNumber":112,"sourceCode":"                    e.getSeaTunnelErrorCode())) {\n                throw CommonError.convertToSeaTunnelTypeError(\n                        DatabaseIdentifier.TIDB, mysqlType.getName(), field);\n            }\n            throw e;\n        }\n    }\n\n    @Override\n    public MysqlType toConnectorType(\n            String field,\n            SeaTunnelDataType<?> seaTunnelDataType,\n            Map<String, Object> dataTypeProperties) {\n        try {\n            return MYSQL_CONVERTOR.toConnectorType(field, seaTunnelDataType, dataTypeProperties);\n        } catch (SeaTunnelRuntimeException e) {\n            if (CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE.equals(\n                    e.getSeaTunnelErrorCode())) {\n                throw CommonError.convertToConnectorTypeError(\n                        DatabaseIdentifier.TIDB, seaTunnelDataType.getSqlType().name(), field);\n            }\n            throw e;\n        }\n    }\n\n    @Override\n    public String getIdentity() {\n        return DatabaseIdentifier.TIDB;\n    }\n}\n","sourceCodeStart":94,"sourceCodeEnd":124,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/catalog/tidb/TiDBDataTypeConvertor.java#L94-L124","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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"],"exampleFix":"// before: writing a MAP field to TiDB sink\nSeaTunnelRow fields contain MapType.STRING_MAP_TYPE column\n// after: flatten or stringify the map first, e.g. to STRING via JSON transform","handlingStrategy":"validation","validationCode":"for (SeaTunnelColumn col : columns) {\n    switch (col.getDataType().getSqlType()) {\n        case MAP: case ARRAY: case ROW:\n            throw new IllegalArgumentException(\"Column '\" + col.getName() + \"' type \" + col.getDataType().getSqlType() + \" not writable to TiDB; convert to STRING/JSON first\");\n        default: break;\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    return tidbConvertor.toConnectorType(field, dataType, props);\n} catch (SeaTunnelRuntimeException e) {\n    if (CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE.equals(e.getSeaTunnelErrorCode())) {\n        log.warn(\"Falling back to STRING type for TiDB field {}\", field);\n        return BasicType.STRING_TYPE;\n    }\n    throw e;\n}","preventionTips":["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"],"tags":["jdbc","tidb","type-conversion","catalog"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}