risingwavelabs/risingwave · error · SinkError::Config
Cannot find `{LON_NAME}`, please set it or use JSON or set `
Error message
Cannot find `{LON_NAME}`, please set it or use JSON or set `{REDIS_VALUE_TYPE}` to `{REDIS_VALUE_TYPE_STRING}` What it means
A Redis geospatial sink (template encoding, redis_value_type='geospatial') needs to know which column holds the longitude. RedisSink::validate throws this SinkError::Config when the `longitude` option is absent, telling the user to set it, use JSON encoding instead, or switch redis_value_type to 'string'.
Source
Thrown at src/connector/src/sink/redis.rs:375
TemplateStringEncoder::check_string_format(key_format, &pk_map)?;
let value_format =
self.format_desc.options.get(VALUE_FORMAT).ok_or_else(|| {
SinkError::Config(anyhow!(
"Cannot find `{VALUE_FORMAT}`, please set it or use JSON"
))
})?;
TemplateStringEncoder::check_string_format(value_format, &all_map)?;
}
Some(REDIS_VALUE_TYPE_GEO) => {
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)?;
let lon_name = self.format_desc.options.get(LON_NAME).ok_or_else(|| {
SinkError::Config(anyhow!(
"Cannot find `{LON_NAME}`, please set it or use JSON or set `{REDIS_VALUE_TYPE}` to `{REDIS_VALUE_TYPE_STRING}`"
))
})?;
let lat_name = self.format_desc.options.get(LAT_NAME).ok_or_else(|| {
SinkError::Config(anyhow!(
"Cannot find `{LAT_NAME}`, please set it or use JSON or set `{REDIS_VALUE_TYPE}` to `{REDIS_VALUE_TYPE_STRING}`"
))
})?;
let member_name = self.format_desc.options.get(MEMBER_NAME).ok_or_else(|| {
SinkError::Config(anyhow!(
"Cannot find `{MEMBER_NAME}`, please set it or use JSON or set `{REDIS_VALUE_TYPE}` to `{REDIS_VALUE_TYPE_STRING}`"
))
})?;
if let Some(lon_type) = all_map.get(lon_name)
&& (lon_type == &DataType::Float64
|| lon_type == &DataType::Float32
|| lon_type == &DataType::Varchar)
{View on GitHub (pinned to 6469eb736d)
Solutions
- Add `longitude = '<column_name>'` to the sink options, pointing at a float/varchar column
- Or switch redis_value_type to 'string' if GEO semantics are not needed
- Or use a JSON encoding which does not require this option
Example fix
-- before
... encode template (redis_value_type = 'geospatial', key_format = 'geo::{pk}', latitude = 'lat', member = 'm')
-- after
... encode template (redis_value_type = 'geospatial', key_format = 'geo::{pk}', longitude = 'lon', latitude = 'lat', member = 'm') Defensive patterns
Strategy: validation
Validate before calling
-- for redis_value_type='geospatial', verify longitude option present and column exists:
-- options.contains_key("longitude") && schema.contains(options["longitude"]) Try / catch
match result.err() { Some(e) if e.contains("longitude") => add_option("longitude", numeric_column), _ => propagate(result) } Prevention
- Always set longitude/latitude/member as a group for geospatial sinks
- Confirm option values match actual column names in the source schema
- Switch to redis_value_type='string' if GEO features are not required
When it happens
Trigger: CREATE SINK with encode template, redis_value_type = 'geospatial', key_format set, but no `longitude = '<column>'` option pointing at the longitude column (src/connector/src/sink/redis.rs:374-378).
Common situations: GEO sink configs missing the longitude option; specifying latitude but not longitude; using JSON-oriented examples that derive lon/lat automatically; option typos such as `lon`.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Cannot find `{MEMBER_NAME}`,please set it.
- Cannot find `{KEY_FORMAT}`,please set it.
- Cannot find `{LAT_NAME}`, please set it.
- Cannot find `{LON_NAME}`, please set it.
- Cannot find '{KEY_FORMAT}', please set it or use JSON (geo v
AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11).
Data as JSON: /api/errors/25483466e78b7b96.
Report an issue: GitHub.