{"record":{"id":"c1a1fd298c160e3e","repo":"risingwavelabs/risingwave","slug":"http-sink-requires-either-url-option-or-url-column","errorCode":null,"errorMessage":"HTTP sink requires either url option or url column","messagePattern":"HTTP sink requires either url option or url column","errorType":"validation","errorClass":"SinkError::Config","httpStatus":null,"severity":"error","filePath":"src/connector/src/sink/http.rs","lineNumber":183,"sourceCode":"            }\n            (Some(url), None) => {\n                let url = url\n                    .parse()\n                    .context(\"invalid URL\")\n                    .map_err(SinkError::Config)?;\n                HttpUrl::Static(url)\n            }\n            (None, Some(url_index)) => {\n                if fields[url_index].data_type != DataType::Varchar {\n                    return Err(SinkError::Config(anyhow!(\n                        \"HTTP sink url column must be varchar, got {:?}\",\n                        fields[url_index].data_type\n                    )));\n                }\n                HttpUrl::Dynamic { url_index }\n            }\n            (None, None) => {\n                return Err(SinkError::Config(anyhow!(\n                    \"HTTP sink requires either url option or url column\"\n                )));\n            }\n        };\n\n        (payload_index, url, fields[payload_index].data_type.clone())\n    };\n\n    if payload_type != DataType::Varchar && payload_type != DataType::Jsonb {\n        return Err(SinkError::Config(anyhow!(\n            \"HTTP sink payload column must be varchar or jsonb, got {:?}\",\n            payload_type\n        )));\n    }\n\n    let mut header_map = HeaderMap::new();\n    header_map.insert(\n        CONTENT_TYPE,","sourceCodeStart":165,"sourceCodeEnd":201,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/connector/src/sink/http.rs#L165-L201","documentation":"The HTTP sink needs a target URL from somewhere: either a static `url` WITH option or a per-row `url` VARCHAR column. If neither is present, `validate_http_sink` fails the sink creation because the sink would have nowhere to send HTTP requests.","triggerScenarios":"Creating an HTTP sink with `WITH (connector='http')` (or with connector params but no `url`) while the sink schema has no column named `url` — the `(None, None)` match arm in `validate_http_sink`.","commonSituations":"Users forget the `url` option entirely when first configuring the HTTP sink; renaming the endpoint column so it's no longer named `url`; typos like `uri` or `endpoint` in the WITH clause.","solutions":["Add `url='https://...'` to the sink's WITH clause","Or add/rename a VARCHAR column named `url` in the sink schema for per-row targets","Check WITH-clause spelling: the option key must be exactly `url`"],"exampleFix":"// before\nCREATE SINK s FROM t WITH (connector='http', format='append_only');\n// after\nCREATE SINK s FROM t WITH (connector='http', url='https://api.example.com/ingest', format='append_only');","handlingStrategy":"validation","validationCode":"let has_url_opt = with_options.contains_key(\"url\");\nlet has_url_col = fields.iter().any(|f| f.name == \"url\");\nif !has_url_opt && !has_url_col {\n    return Err(\"HTTP sink requires a url option or a VARCHAR url column\".into());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include `url='https://...'` in the HTTP sink WITH clause unless using a per-row url column","Double-check exact spelling of the `url` key (not uri/endpoint)"],"tags":["sink","http","missing-config","risingwave"],"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-14T11:17:12.474Z"}