{"record":{"id":"7a7379865748d16c","repo":"alibaba/DataX","slug":"failed-to-create-row-serializer-unsupported-form","errorCode":null,"errorMessage":"Failed to create row serializer, unsupported `format` from stream load properties.","messagePattern":"Failed to create row serializer, unsupported `format` from stream load properties\\.","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisCodecFactory.java","lineNumber":17,"sourceCode":"package com.alibaba.datax.plugin.writer.doriswriter;\n\nimport java.util.Map;\n\npublic class DorisCodecFactory {\n    public DorisCodecFactory (){\n\n    }\n    public static DorisCodec createCodec( Keys writerOptions) {\n        if ( Keys.StreamLoadFormat.CSV.equals(writerOptions.getStreamLoadFormat())) {\n            Map<String, Object> props = writerOptions.getLoadProps();\n            return new DorisCsvCodec (null == props || !props.containsKey(\"column_separator\") ? null : String.valueOf(props.get(\"column_separator\")));\n        }\n        if ( Keys.StreamLoadFormat.JSON.equals(writerOptions.getStreamLoadFormat())) {\n            return new DorisJsonCodec (writerOptions.getColumns());\n        }\n        throw new RuntimeException(\"Failed to create row serializer, unsupported `format` from stream load properties.\");\n    }\n}\n","sourceCodeStart":1,"sourceCodeEnd":20,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/doriswriter/src/main/java/com/alibaba/datax/plugin/writer/doriswriter/DorisCodecFactory.java#L1-L20","documentation":"DorisCodecFactory.createCodec throws this when the stream load format derived from loadProps.format is neither csv nor json (Keys.StreamLoadFormat has exactly those two members). The factory builds a DorisCsvCodec or DorisJsonCodec and has no default branch, so any other format string fails immediately with this RuntimeException.","triggerScenarios":"Setting \"loadProps\": { \"format\": \"CSV_WITH_HEADER\" }, \"format\": \"parquet\" (unsupported in this build), or any casing variant like \"Csv\" — the enum comparison is exact, so case mismatches also miss both branches and fall to the throw. Omitting format entirely is safe only if the default resolves to csv.","commonSituations":"Copying stream load documentation from newer Doris/Flink connectors that support more formats, casing drift after editing the job JSON, or setting format under the wrong key so it is read as an unexpected value.","solutions":["Set loadProps.format to exactly \"csv\" or \"json\" (lowercase) in the doriswriter job configuration.","Remove the format key if the default CSV behavior is what you want.","Confirm the key lives inside loadProps, not at the writer top level.","Check your doriswriter build's Keys.StreamLoadFormat enum for the supported set before choosing a format."],"exampleFix":"// before\n\"loadProps\": { \"format\": \"CSV\" }\n// after\n\"loadProps\": { \"format\": \"csv\", \"column_separator\": \"\\\\x01\" }","handlingStrategy":"validation","validationCode":"String fmt = (String) loadProps.getOrDefault(\"format\", \"csv\");\nif (!\"csv\".equals(fmt) && !\"json\".equals(fmt)) throw new IllegalArgumentException(\"loadProps.format must be 'csv' or 'json' (lowercase), got: \" + fmt);","typeGuard":"boolean isSupportedFormat(String f) { return \"csv\".equals(f) || \"json\".equals(f); }","tryCatchPattern":null,"preventionTips":["Schema-validate the doriswriter job JSON (allowed loadProps keys and enums) in CI.","Use lowercase enum values exactly as Keys.StreamLoadFormat defines them."],"tags":["datax","doris","writer","configuration","stream-load"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}