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.
- Allow access to the cluster from DataLens.
- Create a cluster connection in DataLens.
Activating DataLens
You can only connect a cluster to DataLens within your cloud 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 as long as the cluster is publicly accessible. Learn more about connecting to a cluster from a different folder here.
Limit
You can only create one DataLens instance in the cloud.
- In the management console
, navigate to the folder page. - Navigate to DataLens.
- Click Activate DataLens.
The DataLens instance will be activated in the selected folder.
Allowing access to a cluster from DataLens
To allow DataLens to connect to your cluster and work with its data, enable DataLens access when creating or reconfiguring the cluster.
Creating a cluster connection
-
Make sure DataLens is activated in the relevant folder and has permission to access the cluster.
-
Navigate to Managed Service for ClickHouse.
-
Click the name of your cluster and select 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 have not activated DataLens yet or have connected it in a different folder. To connect your cluster to a DataLens instance from another folder, follow this DataLens guide.
-
Check that the settings are correct by clicking Check connection.
-
After successfully checking the connection, click Create.
After creating the connection, you can:
- Update or delete this connection.
- Use this connection to create datasets from the cluster data.
- Visualize the datasets using charts and dashboards.
Try visualizing data from ClickHouse®.
Viewing a list of cluster connections
-
In the management console
, select the folder containing the cluster. -
Navigate to Managed Service for ClickHouse.
-
Click the name of your cluster and select the DataLens tab.
My connection is not on the list
If your connection is missing from the list, it means the cluster is connected to DataLens as an external source. Learn more about DataLens operation.
Updating a cluster connection
-
In the management console
, select the folder containing the cluster. -
Navigate to Managed Service for ClickHouse.
-
Click the name of your cluster and select the DataLens tab.
-
Select the connection from the list.
My connection is not on the list
If your connection is missing from the list, it means the cluster is connected to DataLens as an external source. Learn more about DataLens operation.
-
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
, select the folder containing the cluster. -
Navigate to Managed Service for ClickHouse.
-
Click the name of your cluster and select the DataLens tab.
-
Select the connection from the list.
My connection is not on the list
If your connection is missing from the list, it means the cluster is connected to DataLens as an external source. Learn more about DataLens operation.
-
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 the 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.
My cluster and DataLens are in different folders
If your cluster and DataLens are in different folders, use the settings from this DataLens guide.
If the Read only setting is enabled 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