{"record":{"id":"a529cb652bbcf6c0","repo":"apache/seatunnel","slug":"unsupported-data-type-a529cb","errorCode":"UNSUPPORTED_DATA_TYPE","errorMessage":"SeaTunnel format text not supported for parsing this type [${sqlType}]","messagePattern":"SeaTunnel format text not supported for parsing this type \\[(.+?)\\]","errorType":"error_code","errorClass":"SeaTunnelCsvFormatException","httpStatus":null,"severity":"error","filePath":"seatunnel-formats/seatunnel-format-csv/src/main/java/org/apache/seatunnel/format/csv/CsvSerializationSchema.java","lineNumber":256,"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 SeaTunnelCsvFormatException(\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    private String addQuotesUsingCSVFormat(String fieldValue) {\n        CSVFormat.Builder builder = CSVFormat.DEFAULT.builder().setRecordSeparator(\"\");\n        switch (quoteMode) {\n            case ALL:\n                builder.setQuoteMode(QuoteMode.ALL);\n                break;\n            case MINIMAL:\n                builder.setQuoteMode(QuoteMode.MINIMAL);\n                break;\n            case NONE:\n                builder.setQuoteMode(QuoteMode.NONE);","sourceCodeStart":238,"sourceCodeEnd":274,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-formats/seatunnel-format-csv/src/main/java/org/apache/seatunnel/format/csv/CsvSerializationSchema.java#L238-L274","documentation":"During CSV serialization, convert() handles primitive types, arrays, and rows; any other SqlType (e.g. MAP) falling into the default branch throws SeaTunnelCsvFormatException(UNSUPPORTED_DATA_TYPE) because text CSV cannot represent that type.","triggerScenarios":"Serializing a SeaTunnelRow whose schema includes a MAP (or other unsupported) column to a CSV sink.","commonSituations":"Piping JSON/Kafka/Debezium sources that contain map fields directly into a CSV sink without transformation.","solutions":["Change the column type to a CSV-supported one (primitives, arrays, nested rows).","Add a transform that converts MAP columns to JSON strings before the CSV sink.","Use a JSON sink instead of CSV if structured/map data must be preserved."],"exampleFix":"// before\nfield = {name = \"props\", type = \"map<string,string>\"}\n// after\nfield = {name = \"props\", type = \"string\"} // serialize map to JSON string upstream","handlingStrategy":"validation","validationCode":"for (SeaTunnelType<?> t : rowType.getFieldTypes()) { check(!containsUnsupportedSqlType(t), \"MAP not serializable to CSV\"); }","typeGuard":null,"tryCatchPattern":"try { sink.write(row); } catch (SeaTunnelCsvFormatException e) { /* convert map columns to strings */ }","preventionTips":["Avoid MAP columns in CSV sink schemas","Convert structured fields to JSON strings upstream","Prefer JSON format for semi-structured data"],"tags":["csv","serialization","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-23T08:17:48.524Z"}