> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-home-button.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> DBeaver はマルチプラットフォーム対応のデータベースツールです。

# DBeaver を ClickHouse に接続

export const PartnerBadge = () => {
  return <div className="PartnerBadge">
            <div className="PartnerBadgeIcon">
                <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <polyline points="12.5 9.5 10 12 6 11 2.5 8.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <polyline points="4.54 4.41 8 3.5 11.46 4.41" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M2.15,3.78 L0.55,6.95 A0.5,0.5 0,0,0 0.77,7.62 L2.5,8.5 L4.54,4.41 L2.82,3.55 A0.5,0.5 0,0,0 2.15,3.78 Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M13.5,8.5 L15.23,7.62 A0.5,0.5 0,0,0 15.45,6.95 L13.85,3.78 A0.5,0.5 0,0,0 13.18,3.55 L11.46,4.41 Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M11.5,4.5 L9,4.5 L6.15,7.27 A0.5,0.5 0,0,0 6.24,8.05 C7.33,8.74 8.81,8.72 10,7.5 L12.5,9.5 L13.5,8.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <polyline points="7.75 13.5 5.15 12.85 3.5 11.67" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                </svg>
            </div>
            Partner Integration
        </div>;
};

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

DBeaver には複数の製品エディションがあります。このガイドでは [DBeaver Community](https://dbeaver.io/) を使用します。各エディションとその機能については、[こちら](https://dbeaver.com/edition/) を参照してください。DBeaver は JDBC を使用して ClickHouse に接続します。

<Note>
  ClickHouse の `Nullable` カラムのサポートが強化されているため、DBeaver バージョン 23.1.0 以降を使用してください。
</Note>

<div id="1-gather-your-clickhouse-details">
  ## 1. ClickHouse の接続情報を確認する
</div>

DBeaver は HTTP(S) 経由の JDBC を使用して ClickHouse に接続します。必要な情報は次のとおりです。

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

<div id="2-download-dbeaver">
  ## 2. DBeaver をダウンロードする
</div>

DBeaver は [https://dbeaver.io/download/](https://dbeaver.io/download/) からダウンロードできます。

<div id="3-add-a-database">
  ## 3. データベースを追加する
</div>

* **Database > New Database Connection** メニュー、または **Database Navigator** の **New Database Connection** アイコンを使用して、**Connect to a database** ダイアログを開きます。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-add-database.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=63b9f08a8e15024a329aa5a812104f0c" size="md" border alt="新しいデータベースを追加する" width="642" height="385" data-path="images/integrations/sql-clients/dbeaver-add-database.png" />

* **Analytical** を選択し、次に **ClickHouse** を選択します。

* JDBC URL を作成します。**Main** タブで Host、Port、Username、Password、Database を設定します。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-host-port.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=b24b122bb124c6405d8575f7827528dc" size="md" border alt="ホスト名、ポート、ユーザー、パスワード、データベース名を設定する" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-host-port.png" />

* デフォルトでは **SSL > Use SSL** プロパティは未設定です。ClickHouse Cloud または HTTP ポートで SSL が必要なサーバーに接続する場合は、**SSL > Use SSL** を有効にします。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-use-ssl.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=bff76a8485ddce69f9a465bdcb5e2f10" size="md" border alt="必要に応じて SSL を有効にする" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-use-ssl.png" />

* 接続をテストします。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-test-connection.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=faa916b9ddc5750fa8c4422cb2d0eac1" size="md" border alt="接続をテストする" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-test-connection.png" />

DBeaver が ClickHouse ドライバーがインストールされていないことを検出すると、ダウンロードするよう案内されます。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-download-driver.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=b4fae01765dbe8bc625e53a02b0ff8a6" size="md" border alt="ClickHouse ドライバーをダウンロードする" width="612" height="689" data-path="images/integrations/sql-clients/dbeaver-download-driver.png" />

* ドライバーをダウンロードしたら、もう一度 **Test** して接続を確認します。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-test-connection.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=faa916b9ddc5750fa8c4422cb2d0eac1" size="md" border alt="接続をテストする" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-test-connection.png" />

<div id="4-query-clickhouse">
  ## 4. ClickHouse にクエリを実行する
</div>

SQL エディタを開いて、クエリを実行します。

* connection を右クリックし、**SQL エディタ > Open SQL Script** を選択して SQL エディタを開きます。

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-sql-editor.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=65ef0c9e0dee9dff88b85c9fcf1164b6" size="md" border alt="SQL エディタを開く" width="636" height="162" data-path="images/integrations/sql-clients/dbeaver-sql-editor.png" />

* `system.query_log` に対するクエリの例:

<Image img="https://mintcdn.com/private-7c7dfe99-home-button/HT6FEZmSxQqQTe8U/images/integrations/sql-clients/dbeaver-query-log-select.png?fit=max&auto=format&n=HT6FEZmSxQqQTe8U&q=85&s=fe208ba0a36727f538535125adefb134" size="md" border alt="クエリの例" width="712" height="316" data-path="images/integrations/sql-clients/dbeaver-query-log-select.png" />

<div id="next-steps">
  ## 次のステップ
</div>

DBeaver の機能については [DBeaver wiki](https://github.com/dbeaver/dbeaver/wiki) を、ClickHouse の機能については [ClickHouse ドキュメント](/ja/) を参照してください。
