Databricks tools setup
Use Databricks tools to let Glean Assistant and agents query your Databricks data without leaving Glean. Users can ask questions in natural language against a Databricks Genie space or run read-only SQL against a Databricks warehouse, and combine the results with other connected apps and documents in Glean.
With this setup, you can:
- Enable Databricks tools in Glean
- Configure OAuth authentication between Glean and Databricks
- Decide which agents and Glean surfaces can use these tools
Databricks tools work in both Glean Assistant and agents. To use Databricks Genie in Glean Assistant, see Connect Databricks Genie to Glean Assistant.
Prerequisites
Before enabling Databricks tools:
- You must have administrative privileges in both Glean and Databricks
- You must provide a default Databricks Warehouse ID and Genie Space ID
- You must be able to access the Glean Admin console
Setup instructions
- In Glean, go to Admin console → Platform → Tools.
- Click Add.
- From Add pre-set tools, select Databricks tools under Tool templates.
- In the Configuration tab, add the following:
- Default Genie Space ID: The default Genie space to query. To find it, open the Genie space in Databricks and copy the ID from the URL, for example,
https://<databricks-instance-id>.cloud.databricks.com/genie?rooms/<genie-space-id>/o=<number>. - Default Warehouse ID: The default warehouse used for SQL execution.
- Host URL: The full address of your Databricks instance. Replace
<databricks-instance-id>with the ID for your instance:- AWS:
https://<databricks-instance-id>.cloud.databricks.com/ - GCP:
https://<databricks-instance-id>.gcp.databricks.com/ - Azure:
https://adb-<databricks-instance-id>.<number>.azuredatabricks.net/
- AWS:
- Default Genie Space ID: The default Genie space to query. To find it, open the Genie space in Databricks and copy the ID from the URL, for example,
Configure authentication
Databricks tools authenticate through a customer-managed Databricks OAuth app. Create the app in Databricks, add its credentials to Glean, and then return the generated callback URL to Databricks.
Create a Databricks OAuth app
- Sign in to your Databricks account console.
- Go to Settings → App Connections.
- Click Add Connection.
- Enter an Application Name, for example,
Glean Databricks Genie OAuth. - Add a placeholder URL in the Redirect URL field. You replace this with the Glean callback URL in Add the callback URL to Databricks.
- Set Access Scopes to All APIs.
- Select Generate a Client Secret.
- Adjust the access and refresh token lifetimes (TTLs) as needed. Databricks recommends about 6 hours for access tokens and 3 months for refresh tokens so background agents do not reauthenticate frequently.
- Save the application, then copy the Client ID and Client Secret.
Enter credentials in Glean
In the Authenticate section of the Databricks tool in Glean:
- Paste the Client ID and Client Secret from the Databricks OAuth app.
- Set the Authorization URL to
https://<host-url>/oidc/v1/authorize. - Set the Token URL to
https://<host-url>/oidc/v1/token. - Set the Scope to
all-apis,offline_access. - Click Save.
Add the callback URL to Databricks
- After you save, Glean generates a Callback URL at the bottom of the Authenticate section. Copy it.
- In the Databricks account console, edit your OAuth app and replace the placeholder Redirect URL with the callback URL from Glean.
- Save the OAuth app.
Enable the tools
Click Edit settings under the Enable Tools section to make tools visible for all or some users within Glean and agents.
See also
- Full list of available Databricks tools and how to test them in Agent Builder: Databricks tools
- Use Databricks Genie in Glean Assistant: Connect Databricks Genie to Glean Assistant
- Troubleshoot authentication: Troubleshooting tools authentication