{"record":{"id":"a9e3b4389a378066","repo":"risingwavelabs/risingwave","slug":"cannot-find-value-format-please-set-it","errorCode":null,"errorMessage":"Cannot find '{VALUE_FORMAT}',please set it.","messagePattern":"Cannot find '(.+?)',please set it\\.","errorType":"validation","errorClass":"SinkError","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/formatter/mod.rs","lineNumber":379,"sourceCode":"                    let channel = b.format_desc.options.get(CHANNEL).cloned();\n                    let channel_column = b.format_desc.options.get(CHANNEL_COLUMN).cloned();\n                    if (channel.is_none() && channel_column.is_none())\n                        || (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                    TemplateEncoder::new_pubsub_stream_key(\n                        b.schema,\n                        pk_indices,\n                        channel,\n                        channel_column,\n                    )\n                }\n                None => {\n                    let template = b.format_desc.options.get(VALUE_FORMAT).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\"Cannot find '{VALUE_FORMAT}',please set it.\"))\n                    })?;\n                    Ok(TemplateEncoder::new_string(\n                        b.schema,\n                        pk_indices,\n                        template.clone(),\n                    ))\n                }\n            },\n            REDIS_VALUE_TYPE_STREAM => match pk_indices {\n                Some(_) => {\n                    let stream = b.format_desc.options.get(STREAM).cloned();\n                    let stream_column = b.format_desc.options.get(STREAM_COLUMN).cloned();\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                            \"`{STREAM}` and `{STREAM_COLUMN}` only one can be set\"\n                        )));","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/formatter/mod.rs#L361-L397","documentation":"For `redis_value_type = 'pubsub'` sinks WITHOUT a primary key, the builder encodes each message with a template and requires the `value_format` option. If `value_format` is absent the sink build fails with this SinkError::Config.","triggerScenarios":"Creating a Redis pubsub sink on a table without a primary key but omitting `value_format = '<template>'` from the WITH options.","commonSituations":"Users switch a pubsub sink from a primary-key table (which needed `channel`/`channel_column` only) to a no-pk table and do not add the now-required `value_format` template.","solutions":["Add `value_format = '<template>'` (e.g. a JSON template with column placeholders) to the WITH options.","Ensure the channel options (`channel`/`channel_column`) are consistent with the table's primary key.","Check the option spelling — it must be exactly `value_format`."],"exampleFix":"// before\nWITH (redis_value_type='pubsub', channel='events');\n// after\nWITH (redis_value_type='pubsub', channel='events', value_format='{\"k\": %s}');","handlingStrategy":"validation","validationCode":"if value_type == \"pubsub\" && !has_pk && !with_options.contains_key(\"value_format\") {\n    return Err(\"PK-less Redis pubsub sink requires `value_format`\".into());\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"`value_format`\") => {\n        eprintln!(\"Add `value_format = '<template>'` to WITH options: {}\", e);\n    }\n    other => other?,\n}","preventionTips":["Remember pubsub sinks without a primary key still need a value template","Use valid template placeholders for message columns","Validate option spelling against documentation"],"tags":["redis","sink","pubsub","configuration"],"backgroundTag":"missing-required-option","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}