Skip to content

Preparing Your Databricks Account

ALTR connects to your Databricks workspace as a service principal, and applies tag-based masking to Unity Catalog columns using native column masks (AWS | Azure).

  1. Create the required groups.
  2. Create the ALTR service principal.
  3. Set the Metastore admin group.
  4. Configure the workspace.
  5. Configure a SQL warehouse.
  6. Allow network access, if IP access lists or context-based ingress controls protect your workspace.
  7. Configure a workspace cluster (optional).

ALTR supports Databricks Premium Tier on AWS and on Azure, in serverless workspaces and classic workspaces, with Unity Catalog enabled. Classic workspaces require a Metastore-level managed storage location. Contact ALTR support about Hive Catalog or connecting Databricks on Google Cloud Platform (GCP).

ALTR uses the ALTR service principal to run a masking job that sets column masks and creates the catalog, tables, and user-defined functions (UDFs) ALTR needs. This job runs whenever you apply a tag-based masking policy to your Unity Catalog.

By default, ALTR runs the masking job as a serverless notebook job and runs automatic tagging on a SQL warehouse, so your workspace doesn’t need a cluster. In a classic workspace, you can instead run masking jobs and automatic tagging on an existing all-purpose cluster – see Configure a Workspace Cluster (Optional). Classification reads sample data through a SQL warehouse either way.

A classic workspace that runs ALTR’s masking jobs on serverless compute must be in a region that supports serverless compute (AWS | Azure).

This setup covers everything needed to run classification and data masking against Databricks. Both are separate, ALTR-side capabilities that don’t require additional Databricks-side configuration.

Before you begin, confirm the following:

  • You have a Databricks user with both account admin privilege (in the Databricks account portal, typically at https://accounts.cloud.databricks.com on AWS or https://accounts.azuredatabricks.net on Azure) and workspace admin privilege on the workspace you want ALTR to connect to.
  • For a classic workspace, the Metastore you want ALTR to connect to has a Metastore-level managed storage location. If you already have a Metastore, see Databricks’ guide to configuring managed storage for an existing Metastore (AWS | Azure). If you’re creating a new Metastore, see Databricks’ guide to creating a Metastore (AWS | Azure).

Create a text file to record the following values as you work through this page – you’ll need them when you connect ALTR to your Databricks account:

Existing Metastore Admin Name:
Metastore Admin Group Name:
ALTR Service Principal Name:
ALTR Service Principal ID:
ALTR Service Principal OAuth Secret:
Databricks Workspace Hostname:
Databricks Workspace Cluster ID:

To create the groups ALTR needs:

  1. From the Databricks account portal, go to User management > Groups > Add group.
  2. Enter altr-service-group for the Group name – this exact name is required.
  3. Add another group and name it Metastore-admins (or a name of your choosing). Record the name you chose in your text file as the Metastore Admin Group Name.

The ALTR service principal is a machine-to-machine Databricks service principal ALTR uses to manage tag-based masking objects on Unity Catalog.

To create the service principal:

  1. From the Databricks account portal, select User management > Service Principals > Add service principal.

  2. Enter a name for the service principal (for example, altr-service-principal). Record the name in your text file as the ALTR Service Principal Name.

  3. Click Add. You’re returned to User management > Service Principals when this completes.

  4. Click the service principal you just created, then select the Credentials & secrets tab.

  5. Under OAuth secrets, click Generate secret.

  6. In Lifetime (days), enter a value from 1 to 730 that is consistent with your company’s security policies.

  7. Under Scope, select Other APIs and confirm that all-apis is listed. If it isn’t, add it from Add scope. ALTR currently requires the all-apis scope.

  8. Click Generate.

  9. Copy the Secret and Client ID values shown, and record them in your text file as the ALTR Service Principal OAuth Secret and ALTR Service Principal ID. Databricks displays the secret only once; you cannot retrieve it after you close the dialog.

  10. Go to Roles and enable Account Admin.

The altr-service-group must be a Metastore admin to see and operate on all objects in Unity Catalog. Since a Metastore can have only one Metastore admin, this step combines the ALTR service group and your existing Metastore admin, if any, into the Metastore-admins group created earlier, then sets that group as the Metastore admin.

To record your existing Metastore admin:

  1. From the Databricks account portal, select Catalog > (your Metastore).
  2. Record the value shown for Metastore Admin, if one is set, in your text file as the Existing Metastore Admin Name.

To add the ALTR service principal to the ALTR service group:

  1. Select User management > Groups.
  2. Click altr-service-group.
  3. Click Add members and add the ALTR service principal you created.

To add the ALTR service group, and any existing Metastore admin, to the Metastore-admins group:

  1. Return to User management > Groups.
  2. Click the Metastore-admins group you created.
  3. Click Add members.
  4. Add altr-service-group and, if you recorded one, the existing Metastore admin.

To set Metastore-admins as the Metastore admin:

  1. Select Catalog and click the Metastore you want ALTR to connect to.
  2. Under Metastore Admin, click Edit.
  3. Set the Metastore-admins group as the Metastore admin.

The ALTR service group needs access to a workspace, with the Workspace access entitlement to run ALTR’s masking jobs and the Databricks SQL access entitlement to use a SQL warehouse. Add the group as a workspace admin: a workspace admin has both entitlements and permission on every SQL warehouse and cluster in the workspace, and it lets ALTR create the temporary workspace group it needs when it classifies a Metastore that already has ALTR tag-based masking policies.

To grant the ALTR service group access to a workspace:

  1. From the Databricks account portal, click Workspaces.
  2. Create or select a workspace for ALTR to connect to – it must be attached to the Metastore you want ALTR to connect to.
  3. Click the workspace name.
  4. Record the workspace URL (or hostname) in your text file as the Databricks Workspace Hostname.
  5. Click Permissions > Add permissions.
  6. Add altr-service-group as an Admin and click Save.

ALTR reads sample data for classification through a SQL warehouse in your workspace, and on a connection with no cluster ID, it runs automatic tagging there too. Without a SQL warehouse in the workspace, classification can’t read sample data and automatic tagging fails. If you create one for ALTR, make it a serverless SQL warehouse (AWS | Azure).

ALTR picks the SQL warehouse automatically from the warehouses in the workspace, and prefers one that is already running.

To configure a SQL warehouse for ALTR:

  1. Log in to the workspace portal (using the hostname you recorded) as a user with admin privilege on that workspace.
  2. Click SQL Warehouses in the sidebar.
  3. If the workspace has no SQL warehouse for ALTR to use, create one:
    1. Click Create SQL warehouse.
    2. Enter a Name.
    3. Set Cluster Size to 2X-Small.
    4. Set Type to Serverless.
    5. Click Create. The warehouse starts automatically.

If you restrict access to the workspace with IP access lists (AWS | Azure) or context-based ingress controls (AWS | Azure), they must allow ALTR’s requests. This applies to serverless and classic workspaces alike. Contact ALTR support for the current list of ALTR’s addresses.

A workspace cluster is optional. Skip this section to run ALTR on serverless compute, which a serverless workspace requires. In a classic workspace, you can instead give ALTR the ID of an existing all-purpose cluster, and ALTR then runs its masking jobs and automatic tagging on that cluster.

To configure a workspace cluster for ALTR:

  1. Log in to the workspace portal (using the hostname you recorded) as a user with admin privilege on that workspace.

  2. Go to Compute.

  3. Create or select an all-purpose compute cluster that runs Python 3.10 or newer and has Unity Catalog enabled.

  4. Click the cluster’s name.

  5. In the Configuration tab, scroll to Tags and expand Automatically added tags.

  6. Record the value shown for ClusterId in your text file as the Databricks Workspace Cluster ID.

With the values recorded in your text file – the service principal ID and OAuth secret, the workspace hostname, and the cluster ID if you configured one – you’re ready to connect the data source in ALTR. See Locate Your Databricks Connection Details if you need help finding any of these values again, and Manage Databricks Data Sources to connect the data source in the ALTR portal.