{"record":{"id":"7a81d155e95c4b11","repo":"apache/seatunnel","slug":"common-06","errorCode":"COMMON-06","errorMessage":"Unsupported format: <format>","messagePattern":"Unsupported format: <format>","errorType":"error_code","errorClass":"RedisConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisTableConfig.java","lineNumber":196,"sourceCode":"            result.catalogTable = CatalogTableUtil.buildWithConfig(config);\n            SeaTunnelRowType seaTunnelRowType = result.catalogTable.getSeaTunnelRowType();\n\n            // Create deserialization schema based on format\n            RedisBaseOptions.Format format = config.get(FORMAT);\n            switch (format) {\n                case JSON:\n                    result.deserializationSchema =\n                            new JsonDeserializationSchema(result.catalogTable, false, false);\n                    break;\n                case TEXT:\n                    result.deserializationSchema =\n                            TextDeserializationSchema.builder()\n                                    .seaTunnelRowType(seaTunnelRowType)\n                                    .delimiter(config.get(FIELD_DELIMITER))\n                                    .build();\n                    break;\n                default:\n                    throw new RedisConnectorException(\n                            CommonErrorCode.ILLEGAL_ARGUMENT, \"Unsupported format: \" + format);\n            }\n        } else {\n            // No schema specified, use simple text table\n            result.catalogTable = CatalogTableUtil.buildSimpleTextTable();\n            result.deserializationSchema = null;\n        }\n\n        // Initialize TablePath\n        result.tablePath = getTablePath(config, keys);\n\n        // Set keyFieldName with default value based on data type\n        RedisDataType dataType = config.get(DATA_TYPE);\n        result.keyFieldName = resolveKeyFieldName(config, dataType);\n\n        return result;\n    }\n}","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-redis/src/main/java/org/apache/seatunnel/connectors/seatunnel/redis/config/RedisTableConfig.java#L178-L214","documentation":"When a schema is configured, buildCatalogTableAndSchema() maps the `format` option to a deserialization schema (json, text, canonical_string?, etc.); an unrecognized format falls to default and throws RedisConnectorException with CommonErrorCode.ILLEGAL_ARGUMENT (COMMON-06). The format determines how Redis values are decoded into SeaTunnel rows.","triggerScenarios":"buildCatalogTableAndSchema() (called via result) receives a `format` value not in the switch's supported set (e.g. 'csv', 'avro', 'JSON' uppercase, or a misspelling) while a schema is defined, so the default branch executes.","commonSituations":"Users assuming Redis connector supports the same formats as Kafka (avro, protobuf), or supplying uppercase/typo'd values like 'Json' instead of 'json'.","solutions":["Use a supported format value exactly as documented (e.g. json, text).","Remove the format option if you don't define a schema (a simple text table is used).","Check the connector docs for the supported format list before setting it."],"exampleFix":"// before\nformat = \"csv\"\n// after\nformat = \"json\"","handlingStrategy":"validation","validationCode":"Set<String> supported = Set.of(\"json\", \"text\");\nif (schema != null && !supported.contains(format)) throw new IllegalArgumentException(\"unsupported format: \" + format);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use only documented format values","Remember Redis supports fewer formats than Kafka","Omit format when no schema is defined"],"tags":["redis","format","unsupported-value"],"backgroundTag":"invalid-enum-value","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"}