Skip to content

Added example for connect to ClickHouse Cloud - #3318

Open
chernser wants to merge 1 commit into
mainfrom
11/09/26/connect_example
Open

chernser wants to merge 1 commit into
mainfrom
11/09/26/connect_example

Conversation

@chernser

@chernser chernser commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Provides example for how to connect via Java Client to ClickHouse Cloud

Closes: https://github.com/ClickHouse/integrations/issues/270

Checklist

Delete items not relevant to your PR:

  • Closes #
  • Unit and integration tests covering the common scenarios were added
  • A human-readable description of the changes was provided to include in CHANGELOG
  • For significant changes, documentation in https://github.com/ClickHouse/clickhouse-docs was updated with further explanations or tutorials

Note

Low Risk
Documentation-only addition with no code, configuration, or dependency changes.

Overview
Adds docs/connect.md, a new guide for connecting Java apps to ClickHouse (including Cloud).

It documents Java Client v2 (com.clickhouse:client-v2) with a Client.Builder example against an HTTPS Cloud endpoint, plus links to official client docs.

It also documents JDBC (com.clickhouse:clickhouse-jdbc), including when to use the all classifier, and sample code using DriverManager, Cloud JDBC URLs, and SELECT version(). It notes the difference between com.clickhouse.jdbc.Driver (pools/frameworks) and com.clickhouse.jdbc.ClickHouseDriver (auto-loaded jar).

Addresses integrations#270 with copy-pasteable connection examples only—no runtime or API changes.

Reviewed by Cursor Bugbot for commit bc7d330. Bugbot is set up for automated code reviews on this repo. Configure here.

@chernser
chernser requested a review from mzitnik as a code owner November 10, 2026 07:44

@security-ai-gate-reviewer security-ai-gate-reviewer Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated approval by the AI review gate.

The required AI review gate concluded SUCCESS on bc7d330, and this change touches no path that requires a human reviewer. This approval is posted by an automated identity (security-ai-gate-reviewer[bot]), not a human, and is bound to the evaluated commit. A new push dismisses it and re-evaluates.

repo=ClickHouse/clickhouse-java pr=#3318 head=bc7d330a40c184a2ee9c86ea03c49317e1574afa

@laeg

laeg commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

thanks for putting this together Sergey, the examples look good and the client_name setup is correct.

the intent of this issue is to update the Cloud console's connect dialog, not add docs to the java repo. the connect dialog code lives in ClickHouse/control-plane. there are already Java and JDBC tabs there but they need updating:

there's also reference code in ClickHouse/examples/language-clients (java-client/ and java-jdbc/) that can be used as the basis.

i've updated the issue description with the details. can you redirect the work to a PR against control-plane instead?

@chernser

Copy link
Copy Markdown
Contributor Author

@laeg
Yes, sure. Actually it was the plan - but I used this PR to let review changes
Will do the redirect

@Flipmonster Flipmonster reopened this Nov 26, 2026
@Flipmonster
Flipmonster requested a review from a team as a code owner November 26, 2026 09:17
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.

3 participants