{"record":{"id":"b3d58f22c23a7c6f","repo":"risingwavelabs/risingwave","slug":"redis-value-type-must-be-set-to-redis-value","errorCode":null,"errorMessage":"`{REDIS_VALUE_TYPE}` must be set to `{REDIS_VALUE_TYPE_STRING}` or `{REDIS_VALUE_TYPE_GEO}` or `{REDIS_VALUE_TYPE_PUBSUB}` or `{REDIS_VALUE_TYPE_STREAM}`","messagePattern":"`(.+?)` must be set to `(.+?)` or `(.+?)` or `(.+?)` or `(.+?)`","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/redis.rs","lineNumber":484,"sourceCode":"                        return Err(SinkError::Config(anyhow!(\n                            \"`{STREAM_COLUMN}` must be set to `varchar`\"\n                        )));\n                    }\n\n                    let value_format =\n                        self.format_desc.options.get(VALUE_FORMAT).ok_or_else(|| {\n                            SinkError::Config(anyhow!(\"Cannot find `{VALUE_FORMAT}`\"))\n                        })?;\n                    let key_format = self.format_desc.options.get(KEY_FORMAT).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\n                            \"Cannot find '{KEY_FORMAT}', please set it or use JSON\"\n                        ))\n                    })?;\n                    TemplateStringEncoder::check_string_format(key_format, &pk_map)?;\n                    TemplateStringEncoder::check_string_format(value_format, &all_map)?;\n                }\n                _ => {\n                    return Err(SinkError::Config(anyhow!(\n                        \"`{REDIS_VALUE_TYPE}` must be set to `{REDIS_VALUE_TYPE_STRING}` or `{REDIS_VALUE_TYPE_GEO}` or `{REDIS_VALUE_TYPE_PUBSUB}` or `{REDIS_VALUE_TYPE_STREAM}`\"\n                    )));\n                }\n            }\n        }\n        self.config.common.build_conn_and_pipe().await?;\n        Ok(())\n    }\n}\n\npub struct RedisSinkWriter {\n    #[expect(dead_code)]\n    epoch: u64,\n    #[expect(dead_code)]\n    schema: Schema,\n    #[expect(dead_code)]\n    pk_indices: Vec<usize>,\n    formatter: SinkFormatterImpl,","sourceCodeStart":466,"sourceCodeEnd":502,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/redis.rs#L466-L502","documentation":"The Redis sink `validate` matches the `value type` option against the known set (`string`, `geo`, `pubsub`, `stream`). Any other (or missing) value falls into the catch-all arm and produces this enum-validation error listing all accepted values.","triggerScenarios":"Create a Redis sink with `value type` set to an unsupported string (e.g. `'hash'`, `'list'`, `'String'` with unexpected casing depending on matching) or omit `value type` while other format options force the match arm.","commonSituations":"Typos in the value type; users familiar with Redis native types trying `hash`/`list` which the sink doesn't support; copied configs from other connectors using different type names.","solutions":["Set `value type` to exactly one of `string`, `geo`, `pubsub`, or `stream`.","Fix casing/typos so the value matches one of the constants.","Check RisingWave docs for supported Redis sink value types if you need an unsupported one; file a feature request otherwise."],"exampleFix":"// before\nWITH (connector='redis', value type='hash')\n// after\nWITH (connector='redis', value type='string', value format='{{k}}:{{v}}')","handlingStrategy":"validation","validationCode":"const VALID = ['string', 'geo', 'pubsub', 'stream'];\nif (!VALID.includes(opts['value type'])) throw new Error(`value type must be one of ${VALID.join(', ')}`);","typeGuard":"const isValidValueType = (v) => ['string','geo','pubsub','stream'].includes(v);","tryCatchPattern":"try { await createSink(cfg); } catch (e) { if (/must be set to `string` or `geo`/.test(String(e))) { cfg['value type'] = 'string'; await createSink(cfg); } else throw e; }","preventionTips":["Copy value type values from docs rather than typing them","Use an enum/constant list in config tooling","Remember the sink supports only string, geo, pubsub, stream — not native redis hash/list"],"tags":["redis","sink","enum-validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}