メインコンテンツまでスキップ
メインコンテンツまでスキップ

Connect QStudio to ClickHouse

Community Maintained

QStudioは無料のSQL GUIで、SQLスクリプトの実行、テーブルのブラウジング、グラフ作成、結果のエクスポートを簡単に行うことができます。すべてのオペレーティングシステムおよびすべてのデータベースで動作します。

QStudioはJDBCを使用してClickHouseに接続します。

1. Gather your ClickHouse details

QStudioはHTTP(S)経由のJDBCを使用してClickHouseに接続します。必要な情報は以下の通りです:

  • エンドポイント
  • ポート番号
  • ユーザー名
  • パスワード

To connect to ClickHouse with HTTP(S) you need this information:

  • The HOST and PORT: typically, the port is 8443 when using TLS or 8123 when not using TLS.

  • The DATABASE NAME: out of the box, there is a database named default, use the name of the database that you want to connect to.

  • The USERNAME and PASSWORD: out of the box, the username is default. Use the username appropriate for your use case.

The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console. Select the service that you will connect to and click Connect:

ClickHouse Cloud service connect button

Choose HTTPS, and the details are available in an example curl command.

ClickHouse Cloud HTTPS connection details

If you are using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.


以下は、ClickHouseにHTTP(S)で接続するために必要な情報です:

  • HOSTとPORT: 通常、TLSを使用する場合はポートが8443、使用しない場合は8123です。

  • DATABASE NAME: デフォルトでは、defaultという名前のデータベースがあります。接続したいデータベースの名前を使用します。

  • USERNAMEとPASSWORD: デフォルトでは、ユーザー名はdefaultです。使用ケースに適したユーザー名を使用します。

ClickHouse Cloudサービスの詳細は、ClickHouse Cloudコンソールで確認できます。 接続するサービスを選択し、Connectをクリックしてください:

ClickHouse Cloud service connect button

HTTPSを選択すると、詳細はexample curlコマンドで確認できます。

ClickHouse Cloud HTTPS connection details

セルフマネージドのClickHouseを使用している場合は、接続の詳細がClickHouse管理者によって設定されます。

2. Download QStudio

QStudioは https://www.timestored.com/qstudio/download/ から入手できます。

3. Add a database

  • QStudioを初めて開いたとき、メニューオプションで Server->Add Server をクリックするか、ツールバーのサーバー追加ボタンをクリックします。
  • 次に、詳細を設定します:
QStudioデータベース接続設定画面でClickHouseの接続設定が表示されています
  1. サーバータイプ: Clickhouse.com
  2. ホストには必ず https:// を含める必要があります ホスト: https://abc.def.clickhouse.cloud ポート: 8443
  3. ユーザー名: default パスワード: XXXXXXXXXXX
  4. [追加]をクリックします。

QStudioがClickHouse JDBCドライバーがインストールされていないことを検出した場合、自動的にダウンロードするオプションが表示されます:

4. Query ClickHouse

  • クエリエディタを開いてクエリを実行します。クエリは以下のように実行できます:

  • Ctrl + e - ハイライトされたテキストを実行

  • Ctrl + Enter - 現在の行を実行

  • 例のクエリ:

QStudioインターフェースにClickHouseデータベースに対するサンプルSQLクエリの実行が表示されています

Next steps

QStudioについての詳細は QStudio を確認し、ClickHouseの機能については ClickHouse documentation を参照してください。