[go: up one dir, main page]

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

DataGripをClickHouseに接続する

Community Maintained

DataGripの起動またはダウンロード

DataGripは https://www.jetbrains.com/datagrip/ から入手可能です。

1. 接続情報を集める

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. ClickHouseドライバをロードする

  1. DataGripを起動し、Data SourcesタブのData Sources and Driversダイアログで、**+**アイコンをクリックします。
DataGripのData Sourcesタブで強調表示された+アイコン

ClickHouseを選択します。

ヒント

接続を確立するにつれて順序が変わりますので、ClickHouseはリストの一番上にないかもしれません。

DataGripのデータソースリストからClickHouseを選択している様子
  • Driversタブに切り替え、ClickHouseドライバをロードします。

    DataGripは、ダウンロードサイズを最小限に抑えるためにドライバを同梱していません。Driversタブで、Complete SupportリストからClickHouseを選択し、+サインを展開します。Provided DriverオプションからLatest stableドライバを選択します:

DataGripのDriversタブに表示されているClickHouseドライバのインストール

3. ClickHouseに接続する

  • データベース接続情報を指定し、Test Connectionをクリックします:

    ステップ1で接続情報を集めたら、ホストURL、ポート、ユーザー名、パスワード、データベース名を入力し、接続をテストします。

    ヒント

    DataGripダイアログのHOSTエントリは実際にはURLです。以下の画像を参照してください。

    JDBC URL設定の詳細については、ClickHouse JDBC driver リポジトリをご覧ください。

ClickHouse設定が含まれたDataGrip接続情報フォーム

詳細情報

DataGripに関する詳細情報は、DataGripのドキュメンテーションを訪れてください。