Skip to main content
Skip to main content

Unity Catalog

Experimental feature. Learn more.
note

The integration with the Unity Catalog works for managed and external tables.

note

This integration is currently only supported on AWS.

ClickHouse supports integration with multiple catalogs (Unity, Glue, Polaris, etc.). This guide will walk you through the steps to query your data managed by Databricks using ClickHouse and the Unity Catalog.

Databricks supports multiple data formats for their lakehouse. With ClickHouse, you can query Unity Catalog tables as both Delta and Iceberg.

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.

In addition to enabling external access, ensure the principal configuring the integration has the EXTERNAL USE SCHEMA privilege on the schema containing the tables.

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).

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

Querying Unity catalog tables using ClickHouse

Now that the connection is in place, you can start querying via the Unity catalog. For example:

If you're using the Iceberg client, only the Delta tables with Uniform-enabled will be shown:

To query a table:

Backticks required

Backticks are required because ClickHouse doesn’t support more than one namespace.

To inspect the table DDL:

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:

Then load the data from your Unity Catalog table via an INSERT INTO SELECT: