{"record":{"id":"8a6c72cb1eee4ed5","repo":"risingwavelabs/risingwave","slug":"cannot-find-value-format-stream-value-type","errorCode":null,"errorMessage":"Cannot find `{VALUE_FORMAT}` (stream value type)","messagePattern":"Cannot find `(.+?)` \\(stream value type\\)","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/redis.rs","lineNumber":473,"sourceCode":"                        || (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\n                    if let Some(stream_column) = stream_column\n                        && let Some(stream_column_type) = all_map.get(stream_column)\n                        && (stream_column_type != &DataType::Varchar)\n                    {\n                        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(())","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/redis.rs#L455-L491","documentation":"In the Redis stream value-type branch, `validate` requires `value format` (a template string for encoding the row value) in the format descriptor options. Missing it aborts validation with this config error, since the stream entry value cannot be built without a template.","triggerScenarios":"Create a sink with `value type='stream'`, valid `stream`/`stream column`, but no `value format` option.","commonSituations":"Users supply `key format` but forget `value format`; configs copied from geo/string examples that use different required options; misspelled option keys.","solutions":["Add `value format = '<template>'` (e.g. `'{{col1}}-{{col2}}'`) to the sink options.","Check the key is spelled exactly `value format`.","Confirm the template placeholders match actual column names so TemplateStringEncoder validation passes."],"exampleFix":"// before\nWITH (connector='redis', value type='stream', stream='events')\n// after\nWITH (connector='redis', value type='stream', stream='events', value format='{{event}}')","handlingStrategy":"validation","validationCode":"if (opts['value type'] === 'stream' && !opts['value format']) throw new Error('stream sink requires value format template');","typeGuard":null,"tryCatchPattern":"try { await createSink(cfg); } catch (e) { if (/Cannot find `value format`/.test(String(e))) { cfg['value format'] = defaultTemplate(cfg); await createSink(cfg); } else throw e; }","preventionTips":["Always pair stream sinks with both key format and value format","Centralize option validation in CI before deploying sinks","Check exact option key spelling"],"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"}