Connecting to a ClickHouse® cluster from DataLens
Yandex DataLens is a business intelligence service, that lets you upload, process and visualize data for analysing and testing hypotheses. It can help you make marketing decisions for your product.
To use an existing cluster as a data source for DataLens:
- Activate Yandex DataLens.
- Enable access to the cluster from DataLens.
- Create a cluster connection in DataLens.
Activating DataLens
You can connect a cluster to DataLens within your cloud only if DataLens is activated in the same folder as the cluster.
If DataLens is activated in a different folder, you can connect a cluster as an external resource provided that public access to the cluster is enabled. Learn more about how to connect to a cluster from a different folder.
Limit
You can only create one DataLens instance in the cloud.
- In the management console
, go to the folder page. - Select DataLens.
- Click Activate DataLens.
The DataLens instance will be activated in the selected folder.
Allowing access to a cluster from DataLens
To enable DataLens to connect to your cluster and work with its data, activate the DataLens access option when creating a cluster or updating its settings.
Creating a connection to a cluster
-
Make sure that DataLens is activated in the appropriate folder and you can access the cluster from it.
-
In the management console
, go to the folder page and select Managed Service for ClickHouse. -
Click the cluster name and open the DataLens tab.
-
Click Create connection.
I have no "Create connection" button
If you see a message saying "DataLens not activated" instead of the Create connection button, it means that you either did not activate DataLens or connected it in a different folder. To connect your cluster to a DataLens instance from another folder, follow the guide in the DataLens documentation.
-
Specify the connection settings.
-
Check that the settings are correct by clicking Check connection.
-
After successfully checking the connection, click Create.
Once the connection is created, you can:
- Update or delete the connection.
- Create datasets with cluster data using the connection.
- Visualize the datasets using charts and dashboards.
See also an example of ClickHouse® data visualization.
Viewing a list of cluster connections
-
In the management console
, go to the folder page and select Managed Service for ClickHouse. -
Click the cluster name and open the DataLens tab.
My connection is not in the list
If the required connection is missing from the list, this means that the cluster is connected to DataLens as an external source. Learn more about DataLens.
Updating a cluster connection
-
In the management console
, go to the folder page and select Managed Service for ClickHouse. -
Click the cluster name and open the DataLens tab.
-
Select a connection from the list.
My connection is not in the list
If the required connection is missing from the list, this means that the cluster is connected to DataLens as an external source. Learn more about DataLens.
-
Change the settings.
-
Check that the settings are correct by clicking Check connection.
-
After successfully checking the connection, click Save.
Deleting a cluster connection
-
In the management console
, go to the folder page and select Managed Service for ClickHouse. -
Click the cluster name and open the DataLens tab.
-
Select a connection from the list.
My connection is not in the list
If the required connection is missing from the list, this means that the cluster is connected to DataLens as an external source. Learn more about DataLens.
-
Click
at the top of the page and select Delete. -
In the window that opens, click Delete.
Connection settings
In the management console
-
Specify a name for the connection.
-
Go to the Select in folder tab.
-
Select the cluster and its host from the drop-down lists or create a new cluster in the folder with DataLens by clicking Create new.
-
Select a user from the drop-down list.
-
Enter this user's password.
Leave the values of the following settings unchanged: HTTP interface port, HTTPS, Cache TTL in seconds, and Raw SQL level.
The cluster and DataLens are in different folders
If the cluster and DataLens are in different folders, use the settings from the instructions in the DataLens documentation.
If the Read only setting is selected for the user, make sure its value is 0
or 2
. Otherwise, the connection will not work.
ClickHouse® is a registered trademark of ClickHouse, Inc