{"record":{"id":"36ae78ab33f9019d","repo":"apache/seatunnel","slug":"common-19-36ae78","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/db2/DB2TypeConverter.java","lineNumber":415,"sourceCode":"                        timestampScale = MAX_TIMESTAMP_SCALE;\n                        log.warn(\n                                \"The timestamp 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                                timestampScale);\n                    }\n                    builder.columnType(String.format(\"%s(%s)\", DB2_TIMESTAMP, timestampScale));\n                    builder.scale(timestampScale);\n                } else {\n                    builder.columnType(DB2_TIMESTAMP);\n                }\n                builder.dataType(DB2_TIMESTAMP);\n                break;\n            default:\n                throw CommonError.convertToConnectorTypeError(\n                        DatabaseIdentifier.DB_2,\n                        column.getDataType().getSqlType().name(),\n                        column.getName());\n        }\n        return builder.build();\n    }\n}\n","sourceCodeStart":397,"sourceCodeEnd":423,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/db2/DB2TypeConverter.java#L397-L423","documentation":"DB2 JDBC dialect failed to map a SeaTunnel data type back to a DB2 column type. DB2TypeConverter.reconvert switches on the column's SqlType; when no case matches (only basic numerics/strings/date-time types are supported) it throws CommonError.convertToConnectorTypeError with dialect DB_2, the SqlType name, and the column name.","triggerScenarios":"Calling DB2TypeConverter.reconvert(Column) during sink-side schema conversion / auto table creation when the SeaTunnel column type is a complex or unsupported type (e.g. MAP, ARRAY, BYTES).","commonSituations":"Auto-creating DB2 tables from upstream schemas containing complex types; chained pipelines where a source emitted array/map columns destined for DB2; sinks using dialect-driven DDL generation.","solutions":["Convert the offending field to a supported DB2-representable type (string, numeric, date/time) before the sink","Pre-create the DB2 table and use a column mapping / cast the data rather than relying on auto DDL","Extend the reconvert switch to map the missing SqlType to a suitable DB2 type"],"exampleFix":"// before\nSeaTunnel column: payload (ARRAY<STRING>) -> DB2 sink\n// after\nSeaTunnel column: payload (STRING, JSON-serialized array) -> DB2 sink","handlingStrategy":"validation","validationCode":"for (SeaTunnelColumn col : columns) {\n    SqlType st = col.getDataType().getSqlType();\n    if (st == SqlType.MAP || st == SqlType.ARRAY || st == SqlType.ROW || st == SqlType.BYTES) {\n        throw new IllegalArgumentException(\"Column '\" + col.getName() + \"' type \" + st + \" not supported by DB2 reconvert; cast before sink\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    return db2Converter.reconvert(column);\n} catch (SeaTunnelRuntimeException e) {\n    if (CommonErrorCode.CONVERT_TO_CONNECTOR_TYPE_ERROR_SIMPLE.equals(e.getSeaTunnelErrorCode())) {\n        log.warn(\"Falling back to VARCHAR for DB2 column {}\", column.getName());\n        return BasicType.STRING_TYPE;\n    }\n    throw e;\n}","preventionTips":["Normalize upstream schemas so only scalar types reach DB2 sinks","Pre-create DB2 tables and cast data in the pipeline instead of dialect-generated DDL","Test the full pipeline schema against DB2TypeConverter.reconvert in CI before release"],"tags":["jdbc","db2","type-conversion","dialect"],"backgroundTag":"unsupported-dtype","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}