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

Connect ClickHouse to Deepnote

Community Maintained

Deepnote は、チームが洞察を発見し共有するために構築された共同作業型データノートブックです。Jupyter互換であるだけでなく、クラウド上で動作し、データサイエンスプロジェクトに効率的に取り組むための中央の作業スペースを提供します。

このガイドは、すでにDeepnoteアカウントをお持ちで、稼働中のClickHouseインスタンスがあることを前提としています。

Interactive example

DeepnoteのデータノートブックからClickHouseをクエリするインタラクティブな例を探索したい場合は、以下のボタンをクリックして、ClickHouse playgroundに接続されたテンプレートプロジェクトを起動してください。

Connect to ClickHouse

  1. Deepnote内で、「Integrations」概要を選択し、ClickHouseタイルをクリックします。
  1. 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:

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

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


ClickHouseにHTTP(S)で接続するには、次の情報が必要です:

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

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

  • USERNAMEとPASSWORD: デフォルトでは、ユーザー名はdefaultです。ご利用のケースに適したユーザー名を使用してください。

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

HTTPSを選択すると、詳細が例のcurlコマンドで提供されます。

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

注意: ClickHouseへの接続がIPアクセスリストで保護されている場合、DeepnoteのIPアドレスを許可する必要があります。詳細はDeepnoteのドキュメントをお読みください。

  1. おめでとうございます!これでClickHouseがDeepnoteに統合されました。

Using ClickHouse integration.

  1. まず、ノートブックの右側でClickHouse統合に接続します。

  2. 次に、新しいClickHouseクエリブロックを作成し、データベースをクエリします。クエリ結果はDataFrameとして保存され、SQLブロックで指定された変数に格納されます。

  3. 既存のSQLブロックをClickHouseブロックに変換することもできます。