Catalog options
ClarityQ supports two Databricks catalog types:- Unity Catalog: the modern, recommended governance layer for Databricks. Supports both serverless and classic SQL warehouses.
- Legacy Hive Metastore: the original
hive_metastorecatalog. Requires a classic (cluster-based) SQL warehouse, as serverless SQL warehouses do not support the legacy Hive Metastore.
Setup
Step 1: Get Databricks connection details
To connect ClarityQ to your Databricks workspace using a service principal, you’ll need the following information:- Server hostname
- HTTP path
- Service principal Application ID
- Service principal OAuth secret
Step 2: Find your Databricks connection details
Server Hostname
- Log in to your Databricks workspace
- In the sidebar, click SQL Warehouses (or Compute → SQL Warehouses)
- Click on your SQL warehouse name
- Go to the Connection Details tab
- Copy the Server hostname (e.g.,
your-workspace.cloud.databricks.com)
HTTP Path
- In the same Connection Details tab of your SQL warehouse
- Copy the HTTP path (e.g.,
/sql/1.0/warehouses/abc123def456)
If you plan to use the Legacy Hive Metastore, make sure your HTTP path points to a classic (cluster-based) SQL warehouse, not a serverless one. Serverless SQL warehouses do not support the legacy Hive Metastore.
Step 3: Create service principal credentials
Create a dedicated service principal for ClarityQ (recommended for production environments):Create service principal for ClarityQ
- In your Databricks workspace, go to Settings → Identity and access
- Click the Service principals tab
- Click Add service principal
- Enter name:
clarityq-service-principal - Click Add
- Click on the newly created service principal
- Copy the Application ID - you’ll need this for the ClarityQ connection, where it will be entered in the Client ID input field (UUID format like
065e73cc-a713-4ae0-8212-ba7f98e32bee) - Go to the Secrets tab
- Click Generate secret
- Set expiration date (recommended for security)
- Click Generate and copy the secret immediately
- In the same service principal details page, go to Permissions tab
- Click Grant access or Add permissions
- Search for and select Service Principal: Use
- Save the changes
- This allows the service principal to execute queries (required for ClarityQ)
Grant SQL Warehouse access
You need to grant the service principal permission to use the SQL Warehouse:- In the sidebar, click SQL Warehouses (or Compute → SQL Warehouses)
- Click on your SQL warehouse name
- Go to the Permissions tab
- Search for and select
clarityq-service-principal - In the permission dropdown, select Can use
- Click Save
Grant data access permissions to ClarityQ
Note: These steps require workspace admin or account admin permissions. If you don’t have these permissions, ask your Databricks administrator to perform these steps. Choose the tab that matches your catalog type:- Unity Catalog
- Legacy Hive Metastore
Grant SELECT permissions to your ClarityQ service principal for the data you want to analyze:Step 1: Navigate to your catalog
- Go to Catalog in your Databricks workspace
- Choose the catalog containing data you want ClarityQ to access
- Select the Permissions tab
- Click the Grant button
- Search for and select your
clarityq-service-principal - Check the SELECT privilege
- Click Grant to save
- Whole catalog: Grants ClarityQ access to all schemas and tables in the catalog
- Specific schema: Navigate to the schema level and repeat the above steps to grant access to specific schemas only
- Specific tables: Navigate to individual tables and grant access to only the tables you want ClarityQ to analyze.
information_schema so ClarityQ can discover available tables and columns.Step 4: Configure connection in ClarityQ
In the ClarityQ interface, fill out the connection form with the following fields:Required Fields
- Connection Name: Choose a name for this connection (e.g., “Production Databricks”)
- Server Hostname: Your Databricks server hostname (e.g.,
your-workspace.cloud.databricks.com) - HTTP Path: Your SQL warehouse HTTP path (e.g.,
/sql/1.0/warehouses/abc123def456) - Client ID: Your service principal Application ID (UUID format, e.g.,
065e73cc-a713-4ae0-8212-ba7f98e32bee) - Client Secret: The service principal OAuth secret generated in Step 3
- Catalog type: Select Unity Catalog (default) or Legacy Hive Metastore
- Choose Legacy Hive Metastore only if your data resides in the original
hive_metastorecatalog and you are using a classic (cluster-based) SQL warehouse
- Choose Legacy Hive Metastore only if your data resides in the original
Step 5: Test the connection
Verify the connection in ClarityQ to ensure:- Databricks workspace accessibility
- SQL warehouse availability
- Token authentication
- Catalog and schema access
- Query execution capabilities
Connection parameters reference
Required parameters
| Parameter | Type | Description | Example |
|---|---|---|---|
connection_name | string | Unique identifier for this connection | Production Databricks |
server_hostname | string | Databricks workspace hostname | your-workspace.cloud.databricks.com |
http_path | string | SQL warehouse HTTP path | /sql/1.0/warehouses/abc123def456 |
client_id | string | Service principal Application ID, entered as Client ID in ClarityQ | 065e73cc-a713-4ae0-8212-ba7f98e32bee |
client_secret | string | Service principal OAuth secret, entered as Client Secret in ClarityQ | dapis... |
Troubleshooting
Common connection issues
Authentication failed- Verify your service principal OAuth secret is correct and not expired
- Check if the service principal has necessary permissions through Admin Settings
- Ensure the user/service principal exists and is active
- Most common cause: Service principal not added to workspace yet
- Ask your Databricks administrator to add the service principal to the workspace
- Missing permissions: Ask your admin to use the role-based approach described above
- Insufficient permissions: Ensure ClarityQ has Service Principal Use role + read access to desired data
- SQL Warehouse access denied: Ensure the service principal has Can use permission on the SQL Warehouse (see Step 3)
- Tables not visible: Ensure
READ_METADATAhas been granted on the schema. Without it, ClarityQ can connect but cannot discover tables. - Serverless warehouse errors: The legacy Hive Metastore is not supported on serverless SQL warehouses. Switch to a classic (cluster-based) SQL warehouse.
- Permission denied on GRANT statements: Hive Metastore grants require workspace admin or the
GRANTprivilege. Ask your administrator to run the SQL grant statements.