{"record":{"id":"c979313f91cc57cb","repo":"apache/seatunnel","slug":"common-19-c97931","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/internal/dialect/mysql/MySqlTypeConverter.java","lineNumber":570,"sourceCode":"                    if (timestampTzScale > MAX_TIMESTAMP_SCALE) {\n                        timestampTzScale = MAX_TIMESTAMP_SCALE;\n                        log.warn(\n                                \"The timestamp_tz column {} type timestamp({}) is out of range, \"\n                                        + \"which exceeds the maximum scale of {}, \"\n                                        + \"it will be converted to timestamp({})\",\n                                column.getName(),\n                                column.getScale(),\n                                MAX_TIMESTAMP_SCALE,\n                                timestampTzScale);\n                    }\n                    builder.columnType(String.format(\"%s(%s)\", MYSQL_TIMESTAMP, timestampTzScale));\n                    builder.scale(timestampTzScale);\n                } else {\n                    builder.columnType(MYSQL_TIMESTAMP);\n                }\n                break;\n            default:\n                throw CommonError.convertToConnectorTypeError(\n                        DatabaseIdentifier.MYSQL,\n                        column.getDataType().getSqlType().name(),\n                        column.getName());\n        }\n\n        return builder.build();\n    }\n}\n","sourceCodeStart":552,"sourceCodeEnd":579,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/mysql/MySqlTypeConverter.java#L552-L579","documentation":"Thrown by MySqlTypeConverter.reconvert() when a SeaTunnel data type cannot be mapped back to a MySQL column type for sink writes or table creation. The switch maps most types (TIMESTAMP variants, TIME with scale, etc.); the default branch covers unsupported SeaTunnel SqlTypes. It fails during sink schema preparation.","triggerScenarios":"reconvert(Column) on MySqlTypeConverter where column.getDataType().getSqlType() falls to the default branch at MySqlTypeConverter.java:570 — e.g. VECTOR/MAP/ARRAY types on connector versions lacking vector support, or types not handled by this MySQL dialect version. Called from type-conversion paths and converter unit tests.","commonSituations":"Auto-creating a MySQL sink table from a source with complex/nested types; forwarding SeaTunnel VECTOR columns to a MySQL version/sink config without vector support; schema mismatch between source dialects (e.g. Oracle source -> MySQL sink with unhandled types).","solutions":["Check '<dataType>' in the message to identify the SeaTunnel type MySQL sink can't handle.","Pre-create the MySQL table and disable auto-create so unsupported types never reach reconvert for DDL.","Insert a cast Transform to convert unsupported columns (e.g. array -> JSON string) before the sink.","Upgrade SeaTunnel for broader MySQL type support (e.g. vector types).","Add a default-branch mapping case in MySqlTypeConverter.reconvert() if a sensible MySQL equivalent exists."],"exampleFix":"// before\nVECTOR column -> MySQL sink auto-create: error\n// after\ntransform: Sql { sql = \"SELECT id, json_query(vec) AS vec FROM source\" }","handlingStrategy":"validation","validationCode":"// Validate sink schema types against MySQL reconvert before writing\nfor (Column col : sinkSchema.getColumns()) {\n    try { new MySqlTypeConverter().reconvert(col); }\n    catch (SeaTunnelRuntimeException e) {\n        throw new IllegalStateException(\"MySQL sink cannot map column \" + col.getName() + \" of \" + col.getDataType());\n    }\n}","typeGuard":"boolean isMySqlSinkColumnValid(Column col) {\n    try { new MySqlTypeConverter().reconvert(col); return true; }\n    catch (SeaTunnelRuntimeException e) { return false; }\n}","tryCatchPattern":"try {\n    converter.reconvert(column);\n} catch (SeaTunnelRuntimeException e) {\n    if (e.getMessage().contains(\"unsupported convert SeaTunnel data type\")) {\n        throw new IllegalArgumentException(\"Column \" + column.getName() + \" type \" + column.getDataType() + \" needs a Transform cast before MySQL sink\");\n    }\n    throw e;\n}","preventionTips":["Pre-create the MySQL table and disable auto-create.","Convert complex types (arrays/maps/vectors) to JSON strings via Transform.","Match source and sink dialect capabilities when designing pipelines.","Keep SeaTunnel current for wider MySQL sink type coverage."],"tags":["jdbc","type-conversion","mysql","sink"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}