> ## Documentation Index
> Fetch the complete documentation index at: https://docs.streamnative.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Unity Catalog for Delta Lake on GCP

This guide describes how to prepare a Databricks Unity Catalog for use with StreamNative Ursa as a Delta Lake catalog on Google Cloud Platform (GCP).

## Prerequisites

* A GCP project with permissions to create GCS buckets and IAM roles
* A Databricks account with permissions to create workspaces

## 1. Create a Databricks Workspace

> Skip this step if you already have the Databricks Workspace in GCP

In the GCP Databricks account console, click **Create workspace**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-01.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=7373cabcb4ea32824708164998899554" alt="Create workspace" width="1920" height="932" data-path="images/ursa-lakehouse/uc-delta-gcp-01.webp" />

Enter the workspace name, choose the region, and provide your GCP project ID.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-02.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=29a2c755c4944b40ac4a9137f6ef35dd" alt="Workspace configuration" width="1920" height="963" data-path="images/ursa-lakehouse/uc-delta-gcp-02.webp" />

Click **Save**. The workspace status shows **Provisioning** while initialization is in progress.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-03.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=f2a16afd42bbf66bad977ca33f85c6df" alt="Workspace provisioning" width="1920" height="414" data-path="images/ursa-lakehouse/uc-delta-gcp-03.webp" />

When the status changes to **Running**, the workspace is ready.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-04.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=ee3ff98f50c8792266fdbc8e602c8201" alt="Workspace running" width="1920" height="444" data-path="images/ursa-lakehouse/uc-delta-gcp-04.webp" />

Open the workspace to enter the Unity Catalog console.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-05.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=391be90e3a0dfa9be592b4e32e8140c8" alt="Unity Catalog console" width="1920" height="970" data-path="images/ursa-lakehouse/uc-delta-gcp-05.webp" />

## 2. (Recommend) Generate an OAuth2 Service Principal

For OAuth2 authentication, navigate to **Identity and access -> Service principals -> Manage**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-10.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=b055f83275f274a5c1ac707fd3f3d655" alt="Service principals" width="1920" height="971" data-path="images/ursa-lakehouse/uc-delta-gcp-10.webp" />

Click **Add service principal -> Add new** and provide a name.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-11.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=1fd093def40de8db74bef332710c97da" alt="Add service principal" width="1920" height="965" data-path="images/ursa-lakehouse/uc-delta-gcp-11.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-12.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=83e75d153982777594e6746408d6be2f" alt="Create service principal" width="1920" height="952" data-path="images/ursa-lakehouse/uc-delta-gcp-12.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-13.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=d172eb21f5a3169cc6762316eefe9c5b" alt="Service principal created" width="1920" height="950" data-path="images/ursa-lakehouse/uc-delta-gcp-13.webp" />

Open the service principal, click **Secrets -> Generate secret**, choose an expiration period, and **Generate**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-14.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=b2ec63d4d8d33871499ac06743b1814e" alt="Generate secret" width="1920" height="971" data-path="images/ursa-lakehouse/uc-delta-gcp-14.webp" />

Record both the **Client ID** and **Client Secret** -- the secret cannot be retrieved later.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-15.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=ac43e302ebd693deca3f8c64655760b8" alt="Client ID and Secret" width="1920" height="913" data-path="images/ursa-lakehouse/uc-delta-gcp-15.webp" />

## 3. (Alternative) Generate a User Token

A Databricks user token can be used by StreamNative Ursa to authenticate against Unity Catalog.

Open **User Settings**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-06.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=c60b5f0c9c40852cda7e1061d4e95243" alt="User settings" width="1920" height="936" data-path="images/ursa-lakehouse/uc-delta-gcp-06.webp" />

Navigate to **Developer -> Access tokens -> Manage** and generate a new token. Record the token value -- it cannot be retrieved later.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-07.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=09968bd9cba0f6e1b34aad19808c47bd" alt="Developer menu" width="1920" height="935" data-path="images/ursa-lakehouse/uc-delta-gcp-07.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-08.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=15359390472944f29ed50537fa79f490" alt="Access tokens" width="1920" height="933" data-path="images/ursa-lakehouse/uc-delta-gcp-08.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-09.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=23aa0ec21b591904b2eb383044942d8f" alt="Generate token" width="1920" height="933" data-path="images/ursa-lakehouse/uc-delta-gcp-09.webp" />

## 4. Configure Unity Catalog Access

Navigate to **Catalog -> Settings -> Metastore**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-16.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=51fbb40f005acde96513398a4fb12cf6" alt="Catalog settings" width="1920" height="934" data-path="images/ursa-lakehouse/uc-delta-gcp-16.webp" />

Enable **External data access** on the metastore.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-17.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=760534ec3443e23a5a45a0aa2eb4bda6" alt="External data access" width="1920" height="931" data-path="images/ursa-lakehouse/uc-delta-gcp-17.webp" />

Grant catalog privileges with the following settings:

* **Principal:** All accounts (or the specific user/service principal)
* **Privilege presets:** Data Editor (selects related privileges automatically)
* **EXTERNAL USE SCHEMA:** Enabled

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-18.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=4704bac807cb49816033b3d4c67ad6ab" alt="Grant privileges" width="1920" height="969" data-path="images/ursa-lakehouse/uc-delta-gcp-18.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-19.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=3edc422b82d32e1a2707ac840b70ed85" alt="Privilege configuration" width="1920" height="965" data-path="images/ursa-lakehouse/uc-delta-gcp-19.webp" />

## 5. Grant Bucket Permissions to the Databricks Service Account

When the Databricks workspace is initialized, a service account is created for Unity Catalog.

Navigate to **Catalog -> Settings -> Credentials** to find the service account.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-27.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=fc3b2211034f57eec5ddad032b99df9e" alt="Credentials menu" width="1920" height="966" data-path="images/ursa-lakehouse/uc-delta-gcp-27.webp" />

Example service account name:

```
db-uc-credential-<id>@uc-uswest1.iam.gserviceaccount.com
```

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-28.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=5f5dfae5d5510768a3296e8d730fc385" alt="Databricks service account" width="1920" height="968" data-path="images/ursa-lakehouse/uc-delta-gcp-28.webp" />

### 5.1 Create a Custom IAM Role

In the GCP console, navigate to **IAM & Admin -> Roles -> Create role** and add the following permissions:

* `storage.buckets.get`
* `storage.objects.create`
* `storage.objects.delete`
* `storage.objects.get`
* `storage.objects.list`

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-29.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=1a0f093e43f6ce91d4b592a390704472" alt="Create role" width="1920" height="968" data-path="images/ursa-lakehouse/uc-delta-gcp-29.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-30.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=f2075f5e4c81c55bb90b295e0706d6e8" alt="Role setup" width="1920" height="970" data-path="images/ursa-lakehouse/uc-delta-gcp-30.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-31.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=d6028becd461ac2241d94cb70a5c45c0" alt="Permissions" width="1674" height="1920" data-path="images/ursa-lakehouse/uc-delta-gcp-31.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-32.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=cdc0d6db2e0d843514ca17908ac2aec8" alt="Permissions selected" width="1920" height="971" data-path="images/ursa-lakehouse/uc-delta-gcp-32.webp" />

### 5.2 Assign the Role to the Databricks Service Account

Open your bucket, click **PERMISSIONS -> View BY PRINCIPALS -> GRANT ACCESS**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-33.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=179c11b211eb9bf19675f6fd1d850b90" alt="Grant bucket access" width="1920" height="969" data-path="images/ursa-lakehouse/uc-delta-gcp-33.webp" />

Add the Databricks service account, select the role created in step 6.1, and click **SAVE**.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-34.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=89a1371d06534c65711ebd44f291aa46" alt="Save access" width="1920" height="969" data-path="images/ursa-lakehouse/uc-delta-gcp-34.webp" />

## 6. Create an External Location in Unity Catalog

Navigate to **Catalog -> Settings -> External Locations** and create a new external location.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-35.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=851d5cd5891f188280cd39a351f6871a" alt="External locations" width="1920" height="968" data-path="images/ursa-lakehouse/uc-delta-gcp-35.webp" />

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-36.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=f30c46392d0fc0fa9f50c55952e74f54" alt="Create external location" width="1920" height="969" data-path="images/ursa-lakehouse/uc-delta-gcp-36.webp" />

Configure with:

* **External location name:** any name
* **URL:** the GCS bucket path
* **Storage credential:** the Unity Catalog credential

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-37.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=6919653db0b21ac7aabf0ae197aacc96" alt="External location form" width="1920" height="963" data-path="images/ursa-lakehouse/uc-delta-gcp-37.webp" />

Click **Test connection** to verify access.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-38.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=0c6e342b007b4b5f38bee069537e8615" alt="External location created" width="1920" height="945" data-path="images/ursa-lakehouse/uc-delta-gcp-38.webp" />

Grant **ALL PRIVILEGES** on the external location to the service principal.

<img src="https://mintcdn.com/streamnative/X17SyiKppfiqQD9i/images/ursa-lakehouse/uc-delta-gcp-39.webp?fit=max&auto=format&n=X17SyiKppfiqQD9i&q=85&s=414e96212dbc5afe81cd9ba3f152d530" alt="Grant OAuth2 permissions" width="1920" height="968" data-path="images/ursa-lakehouse/uc-delta-gcp-39.webp" />

## Catalog Information Summary

When the steps above are complete, collect the following values for the StreamNative Ursa compaction service:

| Value                                               | Description                                                               |
| --------------------------------------------------- | ------------------------------------------------------------------------- |
| `unityCatalogUri`                                   | Databricks workspace URL (e.g., `https://<workspace>.gcp.databricks.com`) |
| `unityCatalogName`                                  | The Unity Catalog name                                                    |
| `unityCatalogToken`                                 | Personal access token from step 2, **or**                                 |
| `unityCatalogClientId` / `unityCatalogClientSecret` | OAuth2 credentials from step 3                                            |

For the next steps, see [Configure Lakehouse Catalogs](../../../configure-lakehouse-catalogs).
