feat(clickhouse sink): add extra_query_params for arbitrary ClickHouse settings - #25939
feat(clickhouse sink): add extra_query_params for arbitrary ClickHouse settings#25939valerypetrov wants to merge 6 commits into
Conversation
…e settings Adds an `extra_query_params` map to the ClickHouse sink config that forwards arbitrary key-value pairs as URL query parameters on every INSERT request, enabling any ClickHouse session setting to be set from Vector config without requiring server-side user profile changes. Example use cases: - deduplicate_blocks_in_dependent_materialized_views = 0 - insert_quorum = 2 - max_insert_block_size = 1048576 Closes vectordotdev#25937
|
All contributors have signed the CLA ✍️ ✅ |
This comment has been minimized.
This comment has been minimized.
|
I have read the CLA Document and I hereby sign the CLA |
|
recheck |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 51cba4db54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2b04426275
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e942ed604
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Summary
Adds an
extra_query_paramsmap to the ClickHouse sink that forwards arbitrary key-value pairs as URL query parameters on every INSERT request.ClickHouse exposes hundreds of session settings via HTTP query parameters, but the sink previously only supported 6 hardcoded async insert settings. This change allows any ClickHouse setting to be passed without requiring server-side user profile changes.
Related issue: #25937
Example
Changes
extra_query_params: HashMap<String, String>field toClickhouseConfigClickhouseServiceRequestBuilderintoset_uri_queryurl::form_urlencoded::Serializeralongside the existingquery/param_database/param_tableparamsextra_query_params_are_appendedverifying params appear in the URITesting
All 36 existing unit tests pass. New test covers the happy path.
Closes #25937