{"record":{"id":"6334367d6635b77e","repo":"risingwavelabs/risingwave","slug":"cannot-find-value-format-please-set-it-or-use","errorCode":null,"errorMessage":"Cannot find `{VALUE_FORMAT}`, please set it or use JSON","messagePattern":"Cannot find `(.+?)`, please set it or use JSON","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/redis.rs","lineNumber":360,"sourceCode":"            super::catalog::SinkEncode::Template\n        ) {\n            match self\n                .format_desc\n                .options\n                .get(REDIS_VALUE_TYPE)\n                .map(|s| s.as_str())\n            {\n                // if not set, default to string\n                Some(REDIS_VALUE_TYPE_STRING) | None => {\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                    let value_format =\n                        self.format_desc.options.get(VALUE_FORMAT).ok_or_else(|| {\n                            SinkError::Config(anyhow!(\n                                \"Cannot find `{VALUE_FORMAT}`, please set it or use JSON\"\n                            ))\n                        })?;\n                    TemplateStringEncoder::check_string_format(value_format, &all_map)?;\n                }\n                Some(REDIS_VALUE_TYPE_GEO) => {\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\n                    let lon_name = self.format_desc.options.get(LON_NAME).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\n                            \"Cannot find `{LON_NAME}`, please set it or use JSON or set `{REDIS_VALUE_TYPE}` to `{REDIS_VALUE_TYPE_STRING}`\"\n                        ))\n                    })?;","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/redis.rs#L342-L378","documentation":"When creating a Redis sink with template encoding and value type `string` (the default), both a `key_format` and a `value_format` template are required. The `validate` step throws this SinkError::Config when `value_format` is missing from the options map, instructing the user to set it or use a JSON encoding.","triggerScenarios":"CREATE SINK with connector='redis', template encoding, `redis_value_type` = 'string' or unset, where `key_format` is provided but no `value_format` option exists in the FORMAT ... ENCODE ... options (src/connector/src/sink/redis.rs:358-363).","commonSituations":"Setting only `key_format` because the key template seems sufficient; copying a GEO/PUBSUB example that has no `value_format` into a string-type sink; typos like `valueformat` or `value-format`.","solutions":["Add `value_format = '<template>'` to the ENCODE TEMPLATE options, e.g. value_format = '{column1}'","Switch to a JSON-based encoding that does not require value_format","Verify the option name is exactly `value_format`"],"exampleFix":"-- before\n... encode template (key_format = 'kv::{pk}')\n-- after\n... encode template (key_format = 'kv::{pk}', value_format = 'v={v}')","handlingStrategy":"validation","validationCode":"-- ensure both templates exist for string-type template Redis sinks:\n-- options.contains_key(\"key_format\") && options.contains_key(\"value_format\")","typeGuard":null,"tryCatchPattern":"match result.err() { Some(e) if e.contains(\"value_format\") => add_missing_option(\"value_format\"), _ => propagate(result) }","preventionTips":["Pair key_format and value_format together when writing template Redis sink configs","Validate CREATE SINK statements against a checklist of required template options","Search config for typos: value_format (underscore, lowercase)"],"tags":["redis","sink","configuration","missing-option"],"backgroundTag":"missing-required-config-field","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}