Creating a ClickHouse connection
Note
DataLens specifics for ClickHouse connections:
- ClickHouse connections only run over the HTTP interface.
- All the data requests are executed with the join_use_nulls flag enabled.
Warning
When connecting to an external data source (that's not a Yandex.Cloud resource), grant access to the source for the DataLens IP address ranges.
178.154.242.176/28
178.154.242.192/28
178.154.242.208/28
178.154.242.128/28
178.154.242.144/28
178.154.242.160/28
Connecting to ClickHouse
To create a ClickHouse connection:
-
Go to the connections page.
-
Click Create connection.
-
Select the ClickHouse connector.
-
Enter a Connection name. You can set any name.
-
Select the connection type:
Select in Yandex.CloudSpecify manuallySpecify the connection parameters for the ClickHouse DB available in Yandex.Cloud:
-
Cluster. Specify a cluster from the list of available ClickHouse clusters. If you don't have an available cluster, click Create new.
Note
The ClickHouse clusters are shown in the list of clusters:
- With the permissions for the user that creates the connection.
- Created in the same folder with the DataLens instance.
-
Hostname. Select the host name from the list of hosts available in the ClickHouse cluster.
-
HTTP interface port. Specify the ClickHouse connection port. The default port is 8443.
-
Username. Specify the username for the ClickHouse connection.
Warning
The user should have one of the following values set for the parameter readonly:
0
: All queries are allowed.2
: Queries to read data and edit settings are allowed.
-
Password. Enter the password for the user.
-
HTTPS. Be sure that the secure connection option is enabled.
Specify the connection parameters for the external ClickHouse database:
-
Hostname. Specify the ClickHouse host path or IP address.
-
HTTP interface port. Specify the ClickHouse connection port. The default port is 8443.
-
Username. Specify the username for the ClickHouse connection.
Warning
The user should have one of the following values set for the parameter readonly:
0
: All queries are allowed.2
: Queries to read data and edit settings are allowed.
-
Password. Enter the password for the user.
-
HTTPS. Enable the secure connection option if your server supports HTTPS.
-
-
Click Save. The connection appears in the list.
Note
You can check the host connection before creating it. To do this, click Check connection.