As this feature is experimental, you will need to enable it using:
SET allow_experimental_database_unity_catalog = 1;Configuring Unity in Databricks
To allow ClickHouse to interact with the Unity catalog, you need to make sure the Unity Catalog is configured to allow interaction with an external reader. This can be achieved by following the “Enable external data access to Unity Catalog” guide. Once your catalog is configured, you must generate credentials for ClickHouse. Two different methods can be used, depending on your interaction mode with Unity:- For Iceberg clients, use authentication as a service principal.
- For Delta clients, use a Personal Access Token (PAT).
Required PAT token permissions
When using a PAT for read access, the token must have permissions that allow ClickHouse to list and read Unity Catalog metadata. Ensure that the PAT has at least theEXTERNAL USE SCHEMA privilege along with SELECT permission on the table, USE CATALOG on its parent catalog, and USE SCHEMA on its parent schema.
Creating a connection between Unity Catalog and ClickHouse
With your Unity Catalog configured and authentication in place, establish a connection between ClickHouse and Unity Catalog.Read Delta
Read Iceberg
To access managed Iceberg tables:Querying Unity catalog tables using ClickHouse
Now that the connection is in place, you can start querying via the Unity catalog. For example:Backticks requiredBackticks are required because ClickHouse doesn’t support more than one namespace.
Loading data from your Data Lake into ClickHouse
If you need to load data from Databricks into ClickHouse, start by creating a local ClickHouse table:INSERT INTO SELECT: