Skip to content

feat(clickhouse): add support for ClickHouse Cloud Query API integration#3557

Open
pedrofrxncx wants to merge 1 commit into
mainfrom
feat/clickhouse-query-api
Open

feat(clickhouse): add support for ClickHouse Cloud Query API integration#3557
pedrofrxncx wants to merge 1 commit into
mainfrom
feat/clickhouse-query-api

Conversation

@pedrofrxncx
Copy link
Copy Markdown
Collaborator

@pedrofrxncx pedrofrxncx commented May 29, 2026

  • Introduced ClickHouseQueryApiConfig for authentication using OpenAPI keys.
  • Updated monitoring engines to support both URL-based and Query API configurations.
  • Enhanced settings to include new ClickHouse service ID, key ID, and key secret.
  • Modified rollup table creation to utilize Query API when configured, ensuring backward compatibility with existing deployments.

What is this contribution about?

Describe your changes and why they're needed.

Screenshots/Demonstration

Add screenshots or a Loom video if your changes affect the UI.

How to Test

Provide step-by-step instructions for reviewers to test your changes:

  1. Step one
  2. Step two
  3. Expected outcome

Migration Notes

If this PR requires database migrations, configuration changes, or other setup steps, document them here. Remove this section if not applicable.

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Summary by cubic

Adds ClickHouse Cloud Query API support for monitoring using OpenAPI keys, with automatic fallback to the existing URL client. Existing deployments keep working; Query API is used only when configured.

  • New Features

    • Added ClickHouseQueryApiEngine and resolveClickHouseQueryApiConfig for OpenAPI key auth.
    • Query API takes precedence when configured; otherwise use URL client; otherwise DuckDB.
    • Rollup DDL runs via Query API when set, else via @clickhouse/client.
    • New settings/env vars: CLICKHOUSE_SERVICE_ID, CLICKHOUSE_KEY_ID, CLICKHOUSE_KEY_SECRET.
  • Migration

    • No breaking changes.
    • To use the Query API, set CLICKHOUSE_SERVICE_ID, CLICKHOUSE_KEY_ID, and CLICKHOUSE_KEY_SECRET (you may keep or omit CLICKHOUSE_URL).
    • The key needs DDL rights to create rollups; otherwise queries fall back to the raw table automatically.

Written for commit 7ddec45. Summary will update on new commits.

Review in cubic

- Introduced ClickHouseQueryApiConfig for authentication using OpenAPI keys.
- Updated monitoring engines to support both URL-based and Query API configurations.
- Enhanced settings to include new ClickHouse service ID, key ID, and key secret.
- Modified rollup table creation to utilize Query API when configured, ensuring backward compatibility with existing deployments.
@github-actions
Copy link
Copy Markdown
Contributor

🧪 Benchmark

Should we run the Virtual MCP strategy benchmark for this PR?

React with 👍 to run the benchmark.

Reaction Action
👍 Run quick benchmark (10 & 128 tools)

Benchmark will run on the next push after you react.

@github-actions
Copy link
Copy Markdown
Contributor

Release Options

Suggested: Minor (2.368.0) — based on feat: prefix

React with an emoji to override the release type:

Reaction Type Next Version
👍 Prerelease 2.367.32-alpha.1
🎉 Patch 2.367.32
❤️ Minor 2.368.0
🚀 Major 3.0.0

Current version: 2.367.31

Note: If multiple reactions exist, the smallest bump wins. If no reactions, the suggested bump is used (default: patch).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant