{"record":{"id":"b68d67ea596f468a","repo":"apache/seatunnel","slug":"sea-tunnel-api-01","errorCode":"SEA-TUNNEL-API-01","errorMessage":"FILE_FIELDS_DELIMITER must be a single character","messagePattern":"FILE_FIELDS_DELIMITER must be a single character","errorType":"validation","errorClass":"ClickhouseConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/ClickhouseFileSinkFactory.java","lineNumber":151,"sourceCode":"                                                configObject.toConfig().getString(NODE_ADDRESS),\n                                        configObject ->\n                                                configObject.toConfig().hasPath(USERNAME.key())\n                                                        ? configObject\n                                                                .toConfig()\n                                                                .getString(USERNAME.key())\n                                                        : \"root\"));\n\n        Map<String, String> nodePassword =\n                readonlyConfig.get(NODE_PASS).stream()\n                        .collect(\n                                Collectors.toMap(\n                                        NodePassConfig::getNodeAddress,\n                                        NodePassConfig::getPassword));\n\n        proxy.close();\n\n        if (readonlyConfig.get(FILE_FIELDS_DELIMITER).length() != 1) {\n            throw new ClickhouseConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    FILE_FIELDS_DELIMITER.key() + \" must be a single character\");\n        }\n        FileReaderOption readerOption =\n                new FileReaderOption(\n                        shardMetadata,\n                        tableSchema,\n                        fields,\n                        readonlyConfig.get(CLICKHOUSE_LOCAL_PATH),\n                        ClickhouseFileCopyMethod.from(readonlyConfig.get(COPY_METHOD).getName()),\n                        nodeUser,\n                        readonlyConfig.get(NODE_FREE_PASSWORD),\n                        nodePassword,\n                        readonlyConfig.get(COMPATIBLE_MODE),\n                        readonlyConfig.get(FILE_TEMP_PATH),\n                        readonlyConfig.get(FILE_FIELDS_DELIMITER),\n                        readonlyConfig.get(KEY_PATH));\n","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/ClickhouseFileSinkFactory.java#L133-L169","documentation":"The ClickHouse file sink validates that the `file_fields_delimiter` config option is exactly one character, because the delimiter is written directly into ClickHouseLocal FORMAT/CSV settings and multi-character delimiters produce malformed files. It throws a CONFIG_VALIDATION_FAILED exception from ClickhouseFileSinkFactory.createSink when the configured value's length is not 1.","triggerScenarios":"Calling createSink with a ReadonlyConfig where FILE_FIELDS_DELIMITER has length != 1, e.g. `file_fields_delimiter = \"\\t\"` written as literal two characters, `\", \"` (comma+space), or an escaped sequence like `\\\\t` that arrives as two characters.","commonSituations":"Users copy delimiters from docs where the tab is shown as the two-character escape `\\\\t`; copying a CSV example with a trailing space after the comma; pasting a delimiter with a hidden trailing whitespace.","solutions":["Set file_fields_delimiter to exactly one character, e.g. file_fields_delimiter = \",\"","For tab, use the actual tab escape recognized by the option parsing (check docs) so the resulting string length is 1","Trim any surrounding whitespace from the configured value"],"exampleFix":"// before\nfile_fields_delimiter = \", \"\n// after\nfile_fields_delimiter = \",\"","handlingStrategy":"validation","validationCode":"String delim = config.get(FILE_FIELDS_DELIMITER);\nif (delim == null || delim.length() != 1) {\n    throw new IllegalArgumentException(\"file_fields_delimiter must be a single character, got: \" + delim);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Write the delimiter as a single literal character, not a multi-char escape","Trim whitespace from config values before submitting","Validate the HOCON config before job submission"],"tags":["config-validation","clickhouse"],"backgroundTag":"invalid-config-value","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"}