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, navigate to the Connections page, and click New Connection.
Fill out the page as follows:
- 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 user name.
- 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.
Looker’s ability to provide some features depends on whether the database dialect can support them.
In the current Looker release, ClickHouse supports the following Looker features:
After completing the database configuration, you can connect to the database from Looker using these directions.