risingwavelabs/risingwave · error · SinkError::Config
` ` must be set to ` ` or ` ` or ` ` or
Error message
`{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}` What it means
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.
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.
Example fix
// before
WITH (connector='redis', value type='hash')
// after
WITH (connector='redis', value type='string', value format='{{k}}:{{v}}') Defensive patterns
Strategy: validation
Validate before calling
const VALID = ['string', 'geo', 'pubsub', 'stream'];
if (!VALID.includes(opts['value type'])) throw new Error(`value type must be one of ${VALID.join(', ')}`); Type guard
const isValidValueType = (v) => ['string','geo','pubsub','stream'].includes(v);
Try / catch
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; } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Cannot find ` `,please set it.
- Cannot find ' ',please set it.
- Cannot find ' ', please set it or use JSON
- Cannot find ' ', please set it or use JSON (stream value…
- Cannot find ' ', please set it or use JSON (geo value type)
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/b3d58f22c23a7c6f.
Report an issue: GitHub.
Appendix: source
Thrown at src/connector/src/sink/redis.rs:484
return Err(SinkError::Config(anyhow!(
"`{STREAM_COLUMN}` must be set to `varchar`"
)));
}
let value_format =
self.format_desc.options.get(VALUE_FORMAT).ok_or_else(|| {
SinkError::Config(anyhow!("Cannot find `{VALUE_FORMAT}`"))
})?;
let key_format = self.format_desc.options.get(KEY_FORMAT).ok_or_else(|| {
SinkError::Config(anyhow!(
"Cannot find '{KEY_FORMAT}', please set it or use JSON"
))
})?;
TemplateStringEncoder::check_string_format(key_format, &pk_map)?;
TemplateStringEncoder::check_string_format(value_format, &all_map)?;
}
_ => {
return Err(SinkError::Config(anyhow!(
"`{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}`"
)));
}
}
}
self.config.common.build_conn_and_pipe().await?;
Ok(())
}
}
pub struct RedisSinkWriter {
#[expect(dead_code)]
epoch: u64,
#[expect(dead_code)]
schema: Schema,
#[expect(dead_code)]
pk_indices: Vec<usize>,
formatter: SinkFormatterImpl,View on GitHub (pinned to 6469eb736d)