Подключение 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.
2. Создайте ресурс ClickHouse
Войдите в ваш аккаунт Retool и перейдите на вкладку Ресурсы. Выберите "Создать новый" -> "Ресурс":

Выберите "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.