{"record":{"id":"b1845f4acb7158e1","repo":"risingwavelabs/risingwave","slug":"cannot-find-lat-name-please-set-it","errorCode":null,"errorMessage":"Cannot find `{LAT_NAME}`, 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":351,"sourceCode":"            }\n            REDIS_VALUE_TYPE_GEO => match pk_indices {\n                Some(_) => {\n                    let member_name = b.format_desc.options.get(MEMBER_NAME).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\"Cannot find `{MEMBER_NAME}`,please set it.\"))\n                    })?;\n                    let template = b.format_desc.options.get(KEY_FORMAT).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\"Cannot find `{KEY_FORMAT}`,please set it.\"))\n                    })?;\n                    TemplateEncoder::new_geo_key(\n                        b.schema,\n                        pk_indices,\n                        member_name,\n                        template.clone(),\n                    )\n                }\n                None => {\n                    let lat_name = b.format_desc.options.get(LAT_NAME).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\"Cannot find `{LAT_NAME}`, please set it.\"))\n                    })?;\n                    let lon_name = b.format_desc.options.get(LON_NAME).ok_or_else(|| {\n                        SinkError::Config(anyhow!(\"Cannot find `{LON_NAME}`,please set it.\"))\n                    })?;\n                    TemplateEncoder::new_geo_value(b.schema, pk_indices, lat_name, lon_name)\n                }\n            },\n            REDIS_VALUE_TYPE_PUBSUB => match pk_indices {\n                Some(_) => {\n                    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                    }","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/formatter/mod.rs#L333-L369","documentation":"For `redis_value_type = 'geospatial'` sinks WITHOUT a primary key, the builder maps value rows to GEOADD coordinates and requires the `latitude` option (the name/template of the latitude column). If `latitude` is missing from the WITH options the build fails with this SinkError::Config.","triggerScenarios":"Creating a Redis geospatial sink on a table without a primary key but omitting `latitude = '<column-name>'` from the WITH options.","commonSituations":"Users assume geospatial sinks auto-detect lat/lon columns; instead the option names `latitude` and `longitude` must be given explicitly in the WITH clause.","solutions":["Add `latitude = '<lat-column>'` to the WITH options.","Also add `longitude = '<lon-column>'`, which is checked immediately after.","If your table actually has a primary key, the code instead expects `member` + `key_format` — align the options with the table shape."],"exampleFix":"// before\nWITH (redis_value_type='geospatial');\n// after\nWITH (redis_value_type='geospatial', latitude='lat', longitude='lon');","handlingStrategy":"validation","validationCode":"if value_type == \"geospatial\" && !has_pk {\n    for opt in [\"latitude\", \"longitude\"] {\n        if !with_options.contains_key(opt) {\n            return Err(format!(\"Redis geospatial sink without PK requires `{}`\", opt));\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"`latitude`\") => {\n        eprintln!(\"Add `latitude`/`longitude` column options: {}\", e);\n    }\n    other => other?,\n}","preventionTips":["Explicitly name lat/lon columns for PK-less geospatial sinks; there is no auto-detection","Ensure the referenced columns exist and are numeric","Match options to the table's primary-key status"],"tags":["redis","sink","geospatial","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"}