{"record":{"id":"474acb6b23eb5932","repo":"apache/seatunnel","slug":"config-validation-failed-474acb","errorCode":"CONFIG_VALIDATION_FAILED","errorMessage":"PluginName: %s, PluginType: %s, Message: %s","messagePattern":"PluginName: (.+?), PluginType: (.+?), Message: (.+?)","errorType":"error_code","errorClass":"RedisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/sink/RedisSinkWriter.java","lineNumber":324,"sourceCode":"                \"UnSupport redisDataType,only support string,list,hash,set,zset\");\n    }\n\n    private SerializationSchema createSerializationSchema(\n            RedisParameters redisParameters, SeaTunnelRowType rowType) {\n\n        RedisBaseOptions.Format format = redisParameters.getFormat();\n\n        switch (format) {\n            case JSON:\n                return new JsonSerializationSchema(rowType);\n            case TEXT:\n                String fieldDelimiter = redisParameters.getFieldDelimiter();\n                return TextSerializationSchema.builder()\n                        .seaTunnelRowType(rowType)\n                        .delimiter(fieldDelimiter)\n                        .build();\n            default:\n                throw new RedisConnectorException(\n                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                        String.format(\n                                \"PluginName: %s, PluginType: %s, Message: %s\",\n                                RedisBaseOptions.CONNECTOR_IDENTITY,\n                                PluginType.SINK,\n                                \"Unsupported format: \" + format));\n        }\n    }\n\n    private String normalizePlaceholders(String input) {\n        if (input == null) {\n            return input;\n        }\n\n        Matcher legacyMatcher = LEGACY_PLACEHOLDER_PATTERN.matcher(input);\n        if (legacyMatcher.find()) {\n            // Convert legacy format {fieldName} to ${fieldName}\n            return legacyMatcher.replaceAll(\"\\\\$\\\\{$1\\\\}\");","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/sink/RedisSinkWriter.java#L306-L342","documentation":"RedisSinkWriter.createSerializationSchema builds the row serialization schema from the configured format. The default branch throws RedisConnectorException (SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED) when the format value is not one the Redis sink supports (e.g. json, text). It wraps the unsupported value in a standard PluginName/PluginType message.","triggerScenarios":"Sink config sets format to an unsupported/misspelled value; createSerializationSchema is invoked during RedisSinkWriter construction or applySchemaChange and hits the switch's default branch.","commonSituations":"format = \"csv\" or \"jsonl\" pasted from another connector's config; case mismatch like \"JSON\"; config copied from Kafka sink with a format Redis doesn't implement.","solutions":["Change format in the sink config to a supported value (json or text)","Match the exact lowercase spelling used by RedisBaseOptions/format enum","If a new format is needed, add a case in createSerializationSchema returning an appropriate SerializationSchema"],"exampleFix":"// before\nformat = \"csv\"\n// after\nformat = \"json\"","handlingStrategy":"validation","validationCode":"if (!Set.of(\"json\",\"text\").contains(format)) throw new IllegalArgumentException(\"Unsupported format: \" + format);","typeGuard":null,"tryCatchPattern":"try { new RedisSinkWriter(...); } catch (RedisConnectorException e) { if (e.getSeaTunnelApiErrorCode() == CONFIG_VALIDATION_FAILED) { /* fix format config */ } throw e; }","preventionTips":["Only use formats documented for the Redis sink","Copy format values from a working template config","Fail fast in CI by instantiating writers from each config variant"],"tags":["redis","sink","serialization","format"],"backgroundTag":"unsupported-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"}