Register a Databricks Unity Catalog Connection
Register your Databricks Unity Catalog data
Requirements
Immuta user with the
APPLICATION_ADMINImmuta permissionDatabricks service principal with the following privileges. For instructions on setting up this user, see the Creating the Databricks service principal section:
USE CATALOGandMANAGEon all catalogs containing securables you want registered as Immuta data sources.USE SCHEMAon all schemas containing securables you want registered as Immuta data sources.MODIFYandSELECTon all securables you want registered as Immuta data sources.Workspace admin on the workspace configured as the host for the integration.
Additional privileges are required for query audit:
USE CATALOGon thesystemcatalogUSE SCHEMAon thesystem.accessandsystem.queryschemasSELECTon the following system tables:system.access.table_lineagesystem.access.column_lineagesystem.access.auditsystem.query.history
Add the Databricks service principal to the
databricks_pii_accessgroup
Databricks user to run the script to register the connection with the following privileges:
Metastore admin and account admin
CREATE CATALOGprivilege on the Unity Catalog metastore to create an Immuta-owned catalog and tables
See the Databricks documentation for more details about Unity Catalog privileges and securable objects.
Prerequisites
Unity Catalog metastore created and attached to a Databricks workspace.
Unity Catalog enabled on your Databricks cluster or SQL warehouse. All SQL warehouses have Unity Catalog enabled if your workspace is attached to a Unity Catalog metastore. Immuta recommends linking a SQL warehouse to your Immuta tenant rather than a cluster for both performance and availability reasons.
Register a connection
Create a separate Immuta catalog for each Immuta tenant
If multiple Immuta tenants are connected to your Databricks environment, create a separate Immuta catalog for each of those tenants. Having multiple Immuta tenants use the same Immuta catalog causes failures in policy enforcement.
Click Data and select the Connections tab in the navigation menu.
Click the + Add Connection button.
Select the Databricks data platform tile.
Enter the connection information:
Display Name: The display name represents the unique name of your connection and will be used as prefix in the name for all data objects associated with this connection. It will also appear as the display name in the UI and will be used in all API calls made to update or delete the connection. Avoid the use of periods (
.) or restricted words in your connection name.Host: The hostname of your Databricks workspace.
Port: Your Databricks port.
HTTP Path: The HTTP path of your Databricks cluster or SQL warehouse.
Immuta Catalog: The name of the catalog Immuta will create to store internal entitlements and other user data specific to Immuta. This catalog will only be readable for the Immuta service principal and should not be granted to other users. The catalog name may only contain letters, numbers, and underscores and cannot start with a number.
Opt to configure an HTTP proxy for this connection by selecting Enable and entering the required details:
Proxy Host: Enter the full proxy URL.
Proxy Port: Enter the proxy port.
Select if the proxy requires authentication:
Disabled
Enabled:
Proxy Username: Enter the username for the proxy connection.
Proxy Password: Enter the password for the proxy connection.
Select your authentication method from the dropdown menu and enter the authentication information for the Immuta service principal that you created.
Click Next.
Configure the Policy setting:
Opt to exclude specific users from policy by adding them to the Exclude Group Pattern. This field cannot be changed after the connection is created.
Click Next.
Configure the Audit settings:
Opt to Enable Audit.
If audit is enabled, opt to enter Workspace IDs to filter the audit ingest to just specific workspaces.
Click Next.
Opt to Enable Object Sync, which will keep your connection objects up to date with your Databricks Unity Catalog environment.
Select the Start Time for when the first object sync job will run each day.
Select the Run Frequency to determine how frequently object sync will run each day.
Opt to Run Object Sync on Create to create all the data objects for your connection. If you do not select this option, you must run object sync manually or wait for the scheduled object sync for your connection's data objects.
Click Save connection.
Copy the provided script and run it in Databricks Unity Catalog as a user with the privileges listed in the requirements section.
Click Validate Connection.
If the connection is successful, click Finish. If there are any errors, check the connection details and credentials to ensure they are correct and try again.
Opt to enable Databricks Unity Catalog tag ingestion
Requirements:
A configured Databricks Unity Catalog connection
Fewer than 10,000 Databricks Unity Catalog data sources registered in Immuta
The following permissions must be added to your Immuta service principal:
USE CATALOGon thesystemcatalogUSE SCHEMAon thesystem.accessschemaSELECTon the following system table:system.access.audit
If ingesting and applying tags to foreign catalogs (created via Lakehouse Federation), the following additional permissions are required:
USE SCHEMAon thesystem.information_schemaschemaSELECTon the following system tables:system.information_schema.column_tagssystem.information_schema.table_tagssystem.information_schema.tablessystem.information_schema.columns
To allow Immuta to automatically import table and column tags from Databricks Unity Catalog, enable Databricks Unity Catalog tag ingestion in the external catalog section of the Immuta app settings page.
Navigate to the App Settings page.
Scroll to 2 External Catalogs, and click Add Catalog.
Enter a Display Name and select Databricks Unity Catalog from the dropdown menu.
Click Save and confirm your changes.
Setting up the required Databricks service principal
If you need instruction for setting up your Databricks service principal before registering your connection, see the steps below.
Creating the Databricks service principal
In Databricks, create a service principal with the privileges listed below. Immuta uses this service principal continuously to orchestrate Unity Catalog policies and maintain state between Immuta and Databricks.
USE CATALOGandMANAGEon all catalogs containing securables you want registered as Immuta data sources.USE SCHEMAon all schemas containing securables you want registered as Immuta data sources.MODIFYandSELECTon all securables you want registered as Immuta data sources. TheMODIFYprivilege is not required for materialized views registered as Immuta data sources, sinceMODIFYis not a supported privilege on that object type in Databricks.Workspace admin permissions (If your service principal is a regular user in Databricks and not an actual service principal in Databricks, follow the guidance for managing users in Databricks documentation to grant this user the workspace admin permission.)
See the Databricks documentation for more details about Unity Catalog privileges and securable objects.
Configuring query audit privileges
Grant the service principal access to the Databricks Unity Catalog system tables. For Databricks Unity Catalog audit to work, Immuta must have, at minimum, the following access.
USE CATALOGon thesystemcatalogUSE SCHEMAon thesystem.accessandsystem.queryschemasSELECTon the following system tables:system.access.table_lineagesystem.access.column_lineagesystem.access.auditsystem.query.history
Access to system tables is governed by Unity Catalog. No user has access to these system schemas by default. To grant access, a user that is both a metastore admin and an account admin must grant
USE_SCHEMAandSELECTprivileges on the system schemas to the service principal. See Manage privileges in Unity Catalog.Create an account-level group in Databricks named
databricks_pii_access(case-sensitive) and add the service principal to the group.
Last updated
Was this helpful?

