WisdomAI connects to Databricks using a Client ID and Client Secret for authentication. This method ensures secure and granular control over the data WisdomAI can access.
You will need the following four pieces of information from your Databricks environment:
Host: The URL of your Databricks workspace, which typically looks like https://<region>.cloud.databricks.com/. You can find this in your SQL Warehouse connection details.
HTTP Path: The specific path to your SQL Warehouse, usually starting with /sql/1.0/warehouses/. You can find this in the “Connection Details” tab of your SQL Warehouse.
Client ID: The Application ID of your Databricks Service Principal.
Client Secret: The secret key generated for your Databricks Service Principal.
The Service Principal needs specific permissions to access the required data that WisdomAI needs.
SQL Warehouse/Cluster Permissions: Grant CAN USE permission to the Service Principal on the SQL Warehouse you are connecting to. You can do this from the Permissions tab of the SQL Warehouse.
Data Privileges: The service principal requires the following privileges in Unity Catalog (or Hive Metastore):
USE CATALOG on the target catalog.
USE SCHEMA on the target schema.
SELECT on the tables and views you want WisdomAI to access.
You can grant these permissions using SQL commands. Here are some examples:
-- Grant permission to use a specific catalogGRANT USAGE ON CATALOG <your_catalog_name> TO `<service_principal_id>`;-- Grant permission to use a specific schemaGRANT USAGE ON SCHEMA <your_catalog_name>.<your_schema_name> TO `<service_principal_id>`;-- Grant select permission on tableGRANT SELECT ON TABLE <your_catalog_name>.<your_schema_name>.<your_table_name> TO `<service_principal_id>`;-- Grant select permission on all tables in a schemaGRANT SELECT ON ALL TABLES IN SCHEMA <your_catalog_name>.<your_schema_name> TO `<service_principal_id>`;
Replace <service_principal_id> with the Application ID of your service principal, and <your_catalog_name>,<your_schema_name>, and <your_table_name> with your specific values.
Once you have gathered the required information, you can configure the connection in WisdomAl:
In WisdomAl, navigate to the Connections section and click Add Connection.
Select Databricks as the data source type.
Fill in the connection details in the “Databricks connection details” section.
Connection Name: Choose a descriptive name for your connection (e.g., “Databricks Prod”).
Host: Paste the Server Hostname you obtained from Databricks.
HTTP Path: Paste the HTTP Path for your SQL Warehouse.
Client ID: Enter your Client ID (Application ID). This field is mandatory.
Client Secret: Enter your Client Secret (the value copied immediately after creation). This field is mandatory.
Catalog Filters (Optional): Specify any Catalog Filters if you want to further restrict the catalogs/schemas WisdomAl crawls.
Click Save and Sync metadata. WisdomAl will use the provided credentials to connect to Databricks and scan the metadata of the specified catalogs and tables.
Least Privilege: Always follow the principle of least privilege. Only grant the necessary permissions to the Service Principal.
Secure Key Management: Treat your Client ID and Client Secret like passwords. Avoid sharing them via insecure channels, such as unencrypted email. Use secure methods, such as LastPass or other secure file-sharing services.
Credential Rotation: Regularly rotate your Client Secrets to enhance security, especially before their expiration.
Double-check that the Service Principal has the necessary CAN USE permission on the SQL Warehouse.
Verify that the Service Principal has the correct USE CATALOG, USE SCHEMA, and SELECT privileges on the Databricks catalogs, schemas, and tables you are trying to access.
Confirm that the SQL Warehouse is running and accessible.
Verify that WisdomAl’s CIDR block (35.238.115.103/32 or 34.82.248.105/32) is allowlisted in your Snowflake network policies or any corporate firewalls.
Assistant
Responses are generated using AI and may contain mistakes.