Looker supports ClickHouse version 0.2 and higher.
Encrypting network traffic
Looker strongly recommends encrypting network traffic between the Looker application and your database. Consider one of the options described on the Enabling secure database access documentation page.
To enable SSL encryption on the server side, see the ClickHouse documentation.
Users and security
First, configure your Looker user on the ClickHouse server. ClickHouse database users are not created with the traditional
CREATE USER command. Follow the ClickHouse Access Rights document to configure the
users section in the
users.xml file. Here is a basic example:
<!-- Users and ACL. --> <users> <looker> <password>CHANGEIT</password> <networks incl="networks" /> <profile>default</profile> <quota>default</quota> </looker> <web> <password></password> <networks incl="networks" /> <profile>web</profile> <quota>default</quota> <allow_databases> <database>test</database> </allow_databases> <allow_dictionaries> <dictionary>test</dictionary> </allow_dictionaries> </web> </users>
Also within this file, configure the appropriate database access:
<allow_databases> <database>database_1</database> <database>database_2</database> <database>database_3</database> </allow_databases>
Adding the connection
In the Admin section of Looker, select Connections, and then select New Connection.
Fill out the connection details (see the Connecting Looker to your database documentation page for more information):
- Dialect: ClickHouse.
- Host: Reachable hostname.
- Port: Port on which the ClickHouse service is reachable over HTTP(S).
- By default, HTTP connections will use 8123, and HTTPS will use 8443.
- Port 9000 and 9440 are by default used by the ClickHouse command line client, but these ports cannot be used by Looker to connect to ClickHouse.
- Your ClickHouse administrator may have chosen alternate ports with the
http_port/https_portsettings in the ClickHouse configuration. Ask your ClickHouse admin for the settings appropriate to your local configuration.
- Database: Database name (must be one of the databases allowed in the
- Username: Database username.
- Password: Database password.
- Additional Params: (Optional) Additional JDBC string parameters.
- PDT and Datagroup Maintenance Schedule: ClickHouse does not support PDTs, so this can be ignored.
- SSL: Check to connect to ClickHouse over SSL.
- Verify SSL: (Optional) Check to enforce strict hostname verification on the ClickHouse server. Check this only if you are using an SSL certificate that is signed by a generally trusted Certificate Authority. If you are using a self-signed SSL certificate, leave it unchecked.
For Looker to support some features, your database dialect must also support them.
In Looker 22.0, ClickHouse supports the following Looker features:
After you have completed the database configuration, connect to the database from Looker.