{"record":{"id":"ce377fc35faaab0b","repo":"risingwavelabs/risingwave","slug":"cannot-find-value-format","errorCode":null,"errorMessage":"Cannot find `{VALUE_FORMAT}`","messagePattern":"Cannot find `(.+?)`","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/redis.rs","lineNumber":443,"sourceCode":"                        || (channel.is_some() && channel_column.is_some())\n                    {\n                        return Err(SinkError::Config(anyhow!(\n                            \"`{CHANNEL}` and `{CHANNEL_COLUMN}` only one can be set\"\n                        )));\n                    }\n\n                    if let Some(channel_column) = channel_column\n                        && let Some(channel_column_type) = all_map.get(channel_column)\n                        && (channel_column_type != &DataType::Varchar)\n                    {\n                        return Err(SinkError::Config(anyhow!(\n                            \"`{CHANNEL_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                    TemplateStringEncoder::check_string_format(value_format, &all_map)?;\n                }\n                Some(REDIS_VALUE_TYPE_STREAM) => {\n                    tracing::error!(\"test:for bug\");\n                    risingwave_common::license::Feature::RedisSinkStream\n                        .check_available()\n                        .map_err(|e| anyhow::anyhow!(e))?;\n                    let stream = self.format_desc.options.get(STREAM);\n                    let stream_column = self.format_desc.options.get(STREAM_COLUMN);\n                    if (stream.is_none() && stream_column.is_none())\n                        || (stream.is_some() && stream_column.is_some())\n                    {\n                        return Err(SinkError::Config(anyhow!(\n                            \"Please specific either `{STREAM}` or `{STREAM_COLUMN}`. They are mutually exclusive options.\"\n                        )));\n                    }\n","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/redis.rs#L425-L461","documentation":"For the Redis sink with a value type that requires a template (string and stream paths), `validate` requires the `value format` option to be present in the format descriptor options. If it is absent, validation returns this config error, because the sink cannot know how to encode row values into the Redis value.","triggerScenarios":"Create a Redis sink with `value type = 'string'` (or omitted so the string branch runs, or 'stream') without supplying `value format = '<template>'` in the options.","commonSituations":"Users forget the `value format` option entirely, or misspell it (e.g. `value_format`, `value-format`); also occurs when copying a JSON-format sink config that never needed it.","solutions":["Add `value format = '<template with placeholders like {{col}}>'` to the sink options.","Check the option key spelling — it must be exactly `value format` (SPACE_FORMAT style keys are space separated).","Use `key format`/`value format` templates consistent with TemplateStringEncoder's supported syntax."],"exampleFix":"// before\n... WITH (connector='redis', value type='string')\n// after\n... WITH (connector='redis', value type='string', value format='{{k}}={{v}}')","handlingStrategy":"validation","validationCode":"if (opts['value type'] === 'string' && !opts['value format']) throw new Error('value format is required for redis string sink');","typeGuard":null,"tryCatchPattern":"try { await createSink(cfg); } catch (e) { if (/Cannot find `value format`/.test(String(e))) cfg['value format'] = promptTemplate(); else throw e; }","preventionTips":["Use a config template/checklist that always includes value format for template-based redis value types","Validate option keys against the documented list before submitting","Beware space-separated option keys — no underscores or dashes"],"tags":["redis","sink","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-23T08:17:48.524Z"}