将 Retool 连接到 ClickHouse
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:

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の管理者によって設定されます。
2. 创建 ClickHouse 资源
登录到您的 Retool 账户并导航到 Resources 选项卡。选择 "创建新资源" -> "资源":

从可用连接器列表中选择 "JDBC":

在设置向导中,确保选择 com.clickhouse.jdbc.ClickHouseDriver
作为 "驱动程序名称":

按照以下格式填写您的 ClickHouse 凭据: jdbc:clickhouse://HOST:PORT/DATABASE?user=USERNAME&password=PASSWORD
。
如果您的实例需要 SSL 或您正在使用 ClickHouse Cloud,请在连接字符串中添加 &ssl=true
,使其看起来像 jdbc:clickhouse://HOST:PORT/DATABASE?user=USERNAME&password=PASSWORD&ssl=true

之后,测试您的连接:

现在,您应该能够使用您的 ClickHouse 资源继续进行应用程序开发。