{"record":{"id":"73de87b38acc3ef5","repo":"apache/seatunnel","slug":"unsupported-data-type-73de87","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"SeaTunnel format text not supported for parsing this type [%s]","messagePattern":"SeaTunnel format text not supported for parsing this type \\[(.+?)\\]","errorType":"error_code","errorClass":"SeaTunnelTextFormatException","httpStatus":null,"severity":"error","filePath":"seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextSerializationSchema.java","lineNumber":238,"sourceCode":"                                                        convert(entry.getKey(), keyType, level + 1),\n                                                        convert(\n                                                                entry.getValue(),\n                                                                valueType,\n                                                                level + 1)))\n                                .collect(Collectors.joining(separators[level + 1]));\n            case ROW:\n                Object[] fields = ((SeaTunnelRow) field).getFields();\n                String[] strings = new String[fields.length];\n                for (int i = 0; i < fields.length; i++) {\n                    strings[i] =\n                            convert(\n                                    fields[i],\n                                    ((SeaTunnelRowType) fieldType).getFieldType(i),\n                                    level + 1);\n                }\n                return String.join(separators[level + 1], strings);\n            default:\n                throw new SeaTunnelTextFormatException(\n                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,\n                        String.format(\n                                \"SeaTunnel format text not supported for parsing this type [%s]\",\n                                fieldType.getSqlType()));\n        }\n    }\n}\n","sourceCodeStart":220,"sourceCodeEnd":246,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextSerializationSchema.java#L220-L246","documentation":"Thrown by TextSerializationSchema.convert when a field's SeaTunnel SqlType has no string-encoding implementation for the text format. The format supports primitives, temporal types and nested ROW via level-based separators; anything else (e.g. unsupported MAP/array cases) hits the default branch and throws SeaTunnelTextFormatException with UNSUPPORTED_DATA_TYPE.","triggerScenarios":"serialize -> convert on a field whose fieldType.getSqlType() is outside the supported set — commonly MAP types, arrays of unsupported elements, or other composite types while writing text output (e.g. to Kafka).","commonSituations":"Sink schema containing MAP columns or nested structures deeper than the configured separators; using the text format for data better suited to the json format; schema drift introducing new types after the text sink was configured.","solutions":["Change complex fields to supported types (primitives/strings) via an upstream transform before the text sink","Switch the sink format from text to json, which supports nested MAP/ARRAY/ROW types","Reduce nesting depth to what the text format's separator levels support, or configure separators for the needed level"],"exampleFix":"// before (sink schema)\nfield_meta = map<string,string>  // not string-encodable here\n\n// after\nfield_meta = string  // upstream: JSON-encode the map yourself","handlingStrategy":"validation","validationCode":"Set<SqlType> textWritable = Set.of(SqlType.STRING, SqlType.BOOLEAN, SqlType.TINYINT,\n    SqlType.SMALLINT, SqlType.INT, SqlType.BIGINT, SqlType.FLOAT, SqlType.DOUBLE,\n    SqlType.DECIMAL, SqlType.DATE, SqlType.TIME, SqlType.TIMESTAMP,\n    SqlType.TIMESTAMP_TZ, SqlType.ROW);\nif (!textWritable.contains(fieldType.getSqlType())) {\n    throw new IllegalArgumentException(\"Type not text-encodable: \" + fieldType.getSqlType());\n}","typeGuard":"boolean isTextEncodable(SeaTunnelDataType<?> t) {\n    switch (t.getSqlType()) {\n        case STRING: case BOOLEAN: case TINYINT: case SMALLINT: case INT: case BIGINT:\n        case FLOAT: case DOUBLE: case DECIMAL: case DATE: case TIME:\n        case TIMESTAMP: case TIMESTAMP_TZ: case ROW:\n            return true;\n        default:\n            return false; // e.g. MAP beyond supported levels\n    }\n}","tryCatchPattern":"try {\n    byte[] bytes = textSchema.serialize(row);\n} catch (SeaTunnelTextFormatException e) {\n    log.error(\"Field type not supported by text format: {}\", e.getMessage());\n    throw e;\n}","preventionTips":["Prefer json format when the schema contains MAP or deep nested types","String-encode complex fields in an upstream transform before a text sink","Check nesting depth against the configured separator levels"],"tags":["text-format","serialization","data-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"}