risingwavelabs/risingwave · error · SinkError::Config

HTTP sink url option cannot coexist with url column

Error message

HTTP sink url option cannot coexist with url column

What it means

The HTTP sink in RisingWave can take its target URL either from a static `url` option in the WITH clause or from a dedicated `url` column in the schema, but not both. During sink validation (`validate_http_sink`), if both a `url` option is set and a column named `url` (HTTP_SINK_URL_COLUMN) exists in the schema, the sink is rejected because the source of the URL would be ambiguous.

Source

Thrown at src/connector/src/sink/http.rs:162

                    )));
                }
            }
        }

        let payload_index = fields
            .iter()
            .position(|field| field.name == HTTP_SINK_PAYLOAD_COLUMN)
            .ok_or_else(|| {
                SinkError::Config(anyhow!(
                    "HTTP sink with multiple columns requires a payload column"
                ))
            })?;
        let url_index = fields
            .iter()
            .position(|field| field.name == HTTP_SINK_URL_COLUMN);
        let url = match (url, url_index) {
            (Some(_), Some(_)) => {
                return Err(SinkError::Config(anyhow!(
                    "HTTP sink url option cannot coexist with url column"
                )));
            }
            (Some(url), None) => {
                let url = url
                    .parse()
                    .context("invalid URL")
                    .map_err(SinkError::Config)?;
                HttpUrl::Static(url)
            }
            (None, Some(url_index)) => {
                if fields[url_index].data_type != DataType::Varchar {
                    return Err(SinkError::Config(anyhow!(
                        "HTTP sink url column must be varchar, got {:?}",
                        fields[url_index].data_type
                    )));
                }
                HttpUrl::Dynamic { url_index }

View on GitHub (pinned to 6469eb736d)

Solutions

  1. Remove the `url` option from the sink's WITH clause if you intend per-row URLs from the `url` column
  2. Rename the schema column (and use it as payload/other column) if you intend a single static URL from the `url` option
  3. Recreate the sink with only one of the two URL sources

Example fix

// before
CREATE SINK s FROM t WITH (connector='http', url='https://api.example.com/ingest'); -- t has column `url`
// after
CREATE SINK s FROM t WITH (connector='http'); -- use dynamic per-row url column
-- or keep static url and rename t.url -> endpoint_url
Defensive patterns

Strategy: validation

Validate before calling

let has_url_opt = with_options.contains_key("url");
let has_url_col = fields.iter().any(|f| f.name == "url");
if has_url_opt && has_url_col {
    return Err("HTTP sink: remove either the url option or the url column".into());
}

Prevention

When it happens

Trigger: Creating an HTTP sink with `WITH (connector='http', url='https://...')` while the sink's schema/table also contains a column named `url` — the `try_from` conversion calls `validate_http_sink`, which matches the `(Some(_), Some(_))` arm.

Common situations: Users rename an existing table column to `url` (e.g. to store per-row endpoints) and forget the static `url` option is still present in the sink's WITH clause; or copy a sink definition and add a dynamic url column without removing the static url option.

Related errors


AI-assisted analysis of risingwavelabs/risingwave@6469eb736d (2026-09-11). Data as JSON: /api/errors/94bd8fa9bc3a4ce6. Report an issue: GitHub.