{"record":{"id":"777be9643b4f039f","repo":"apache/seatunnel","slug":"common-19-777be9","errorCode":"COMMON-19","errorMessage":"'${identifier}' unsupported convert SeaTunnel data type '${dataType}' of '${field}' to connector data type.","messagePattern":"'(.+?)' unsupported convert SeaTunnel data type '(.+?)' of '(.+?)' to connector data type\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/saphana/SapHanaTypeConverter.java","lineNumber":460,"sourceCode":"                    int timestampScale = column.getScale();\n                    if (column.getScale() > MAX_TIMESTAMP_SCALE) {\n                        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(HANA_TIMESTAMP);\n                    builder.dataType(HANA_TIMESTAMP);\n                    builder.scale(timestampScale);\n                }\n                break;\n            default:\n                throw CommonError.convertToConnectorTypeError(\n                        DatabaseIdentifier.SAP_HANA,\n                        column.getDataType().getSqlType().name(),\n                        column.getName());\n        }\n        BasicTypeDefine typeDefine = builder.build();\n        typeDefine.setColumnType(\n                appendColumnSizeIfNeed(\n                        typeDefine.getColumnType(), typeDefine.getLength(), typeDefine.getScale()));\n        return typeDefine;\n    }\n\n    public static String appendColumnSizeIfNeed(String columnType, Long length, Integer scale) {\n        if (shouldAppendLength.contains(columnType) && length != null && length != 0) {\n            return columnType + \"(\" + length + \")\";\n        } else if (columnType.equalsIgnoreCase(HANA_DECIMAL)\n                && length != null\n                && scale != null\n                && length != 0) {","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/saphana/SapHanaTypeConverter.java#L442-L478","documentation":"SAP HANA JDBC connector's SapHanaTypeConverter.reconvert() maps a SeaTunnel column type back to the HANA SQL column type when writing. When the column's SeaTunnel SqlType falls into the switch's default branch (no HANA mapping exists, e.g. MAP/ARRAY/unsupported types), it throws CommonError.convertToConnectorTypeError. This is a hard stop: the sink cannot serialize that field into a HANA column type.","triggerScenarios":"Calling reconvert() on a Column whose DataType.getSqlType() has no case in the HANA switch — e.g. a SeaTunnel MAP, ARRAY, ROW or otherwise unmapped type flowing into a SAP HANA sink during table auto-creation or schema mapping.","commonSituations":"Upstream source (e.g. a file or NoSQL connector) produces nested types that HANA sink cannot map; users set auto-Create table with schema containing complex types; type translation pipeline routes an exotic type to HANA.","solutions":["Flatten or cast the offending field to a supported scalar type (STRING, INT, TIMESTAMP, etc.) before the HANA sink using a transform (e.g. SQL transform / JsonPath).","Exclude the unsupported column from the sink's schema (remove it from the table_path/schema or use a field filter).","If support is genuinely needed, add a case for the SqlType in SapHanaTypeConverter.reconvert() and/or the upstream converter and contribute the mapping.","Disable auto table creation and pre-create the HANA table with an explicit compatible DDL."],"exampleFix":"// before: passing MAP column straight to HANA sink\n// after: add a transform that flattens/casts it\ntransform {\n  Sql {\n    source_table_name = \"src\"\n    result_table_name = \"flat\"\n    query = \"SELECT id, CAST(attrs AS STRING) AS attrs_str FROM src\"\n  }\n}","handlingStrategy":"validation","validationCode":"// Inspect the SeaTunnel schema before the HANA sink\nCatalogTable table = ...;\nfor (Column c : table.getTableSchema().getColumns()) {\n    switch (c.getDataType().getSqlType()) {\n        case STRING: case INT: case BIGINT: case DOUBLE: case DECIMAL:\n        case BOOLEAN: case DATE: case TIMESTAMP: case BYTES:\n            break;\n        default:\n            throw new IllegalStateException(\n                \"Column \" + c.getName() + \" type \" + c.getDataType().getSqlType()\n                + \" needs flattening/casting before SAP HANA sink\");\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    catalogTable = sink.createCatalogTable(...);\n} catch (SeaTunnelRuntimeException e) {\n    if (e.getMessage().contains(\"unsupported convert SeaTunnel data type\")) {\n        // flatten/cast offending column and retry\n    } else { throw e; }\n}","preventionTips":["Flatten nested types at the source/transform stage before any JDBC sink.","Pre-create HANA tables with explicit DDL instead of auto-creation.","Keep the SeaTunnel->HANA type mapping table handy when designing pipelines.","Run schema validation in a dry-run before production writes."],"tags":["jdbc","sap-hana","type-conversion","sink","unsupported-type"],"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"}