feat(sink): support dynamic URL for HTTP sink - #25699
Conversation
Allow HTTP sinks to derive the target URL from a row column when the sink output schema contains payload and url columns. Keep the existing single-column static URL behavior unchanged.
|
How to tell the difference between use |
The http payload is in a single column, either jsonb or text. When the sink has only a single column, this column is the payload column. When the sink has multiple column, we check the name of each column, to be either |
hzxa21
left a comment
There was a problem hiding this comment.
Left a comment about log DDoS. You can merge the PR first and create follow-up issue on that you would like to provide a preview image for trial usage first.
Rest LGTM.
| tracing::warn!( | ||
| error = %err.as_report(), | ||
| payload = %self.strip_payload_for_log(row), | ||
| "skip HTTP sink row due to invalid URL in url column" | ||
| ); | ||
| Ok(None) | ||
| } | ||
| } | ||
| } | ||
| Some(ScalarRefImpl::Utf8(_)) | None => { | ||
| tracing::warn!( | ||
| payload = %self.strip_payload_for_log(row), | ||
| "skip HTTP sink row due to null or empty url column" | ||
| ); |
There was a problem hiding this comment.
How about implementing some kind of a log suppressor to avoid log DDoS when there are many invalid URLs in the payload?
There was a problem hiding this comment.
Will integrate it to sink dead letter queue when it's implemented.
…#25889) Co-authored-by: William Wen <44139337+wenym1@users.noreply.github.com> Co-authored-by: congyi wang <58715567+wcy-fdu@users.noreply.github.com>
|
✅ Cherry-pick PRs (or issues if encountered conflicts) have been created successfully to all target branches. |

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR extends the HTTP sink so its target URL can be supplied by the sink row itself.
varcharorjsonbpayload column withWITH (url = ...).payloadcolumn of typevarcharorjsonburlcolumn of typevarcharurloption or the dynamicurlcolumn.reqwest::Url, and parses dynamic row URLs before sending each request.CREATE SINK AS SELECT.Example SQL:
For
CREATE SINK AS SELECT, project the payload and URL columns with the required output names:Checklist
Documentation
Release note
HTTP sinks can now derive the target URL from a row column by outputting
payloadandurlcolumns, enabling dynamic per-row HTTP destinations while preserving the existing static URL behavior.