Skip to main content

Databricks Tools Setup

The Databricks tools contain the following tools:

With this setup, you can:

tip

Databricks tools can be used in both agents and Glean Assistant. See Connect Databricks Genie to Glean Assistant for setup instructions.

Tools setup instructions

Prerequisites

Before enabling Databricks actions, ensure:

How to Set up Databricks Tools

  1. Open Glean Settings page
  2. Go to Platforms → Tools
  3. Click on Add button for creating a new tool
  4. Click on the Databricks Tools box
  5. Populate the Configuration section
    1. In the Default Genie Space Id text box, add the Databricks Genie space id.
      Note: To get the Genie Space Id- when you have the Genie Space open in the Databricks UI, you can get the Genie Space Id from the URL. https://<databricks-instance-id>.cloud.databricks.com/genie?rooms/<genie-space-id>/o=<anothernumber>
    2. In the Default Warehouse Id text box, add the default Databricks Warehouse Id to be used for the tool.
    3. In the Host Url text box, add the full Databricks Genie host url in the following format. Replace the databricks-instance-id with the correct ID for your Databricks 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/

If you are using Genie, get the Genie Space ID from the Databricks UI URL. For example: https://<databricks-instance-id>.cloud.databricks.com/genie?rooms/<genie-space-id>/o=<anothernumber>.

  1. Populate the Authenticate section
    1. Create OAuth app on Databricks account as per this section.
    2. Copy the Client ID and Client Secret from the OAuth app into the Authenticate section of the Tool you are setting up.
    3. Populate Authorization url as https://<AWS-or-GCP-or-Azure-Host-URL-from-step-5c>/oidc/v1/authorize
    4. Populate Token url as https://<AWS-or-GCP-or-Azure-Host-URL-from-step-5c>/oidc/v1/token
    5. Add the Scope as all-apis,offline_access
    6. Final Authenticate section should look like this:
  2. Save the Tool.
  3. A callback URL is generated after saving the Tool. Copy that over into the Databricks OAuth app on the Databricks account console.
  4. The Tool is now set up, and can be added to any app/prompt.
  5. Final Tool Setup should look like this–

Create a Databricks OAuth app

Create a Databricks OAuth app and copy the Client ID and Client Secret into the Authenticate section of the tool in Glean.

The following steps for creating OAuth application in Databricks is applicable for both AWS Databricks and Azure Databricks:

  1. Sign in to your Databricks cloud account.
  2. After you log in, go to Settings → App Connections.
  3. Click Add Connection.
  4. Enter Application Name, for example, Glean Databricks Genie OAuth.
  5. Add a dummy URL in the Redirect URL field.
  6. Set Access Scopes to All APIs.
  7. Select Generate a Client Secret.
  8. Adjust the access token and refresh token TTLs as needed. The current guidance recommends 6 hours for access tokens and 3 months for refresh tokens so background agents do not need to reauthenticate frequently.
  9. Save the application.
  10. Copy the Client ID and Client Secret.

oauth app TTL values

  1. Save the application.
  2. Copy the Client Id and Client Secret into the Authentication section of the Tool you are setting up in this section.
  3. After the Tool is saved in this section, a Callback URL will be generated in the Authentication section of the Tool. Copy that URL.
  4. Edit the OAuth application on the Databricks account, and update it with the Callback URL from the previous step.
  5. Final OAuth app setup should look like this

  1. Enter the Client ID and Client Secret from the Databricks OAuth app.

  2. Set Authorization url to https://<AWS-or-GCP-or-Azure-Host-URL>/oidc/v1/authorize.

  3. Set Token url to https://<AWS-or-GCP-or-Azure-Host-URL>/oidc/v1/token.

  4. Set Scope to all-apis,offline_access.

  5. Save the action.

  6. Login to Databricks account

  7. Go to “Manage Account” —> “Settings” —> “App Connections”

  8. Click “Add Connection

  9. Populate an appropriate Application Name like “Glean Databricks Genie OAuth”

  10. Add a dummy URL in the Redirect URL box.

  11. Set “Access Scopes” to “All APIs”

  12. Ensure “Generate a Client Secret” is checked

  13. Adjust the TTLs if required. Default is fine as well.

  14. Save the application.

  15. Copy the Client Id and Client Secret into the Authentication section of the Tool you are setting up in this section.

  16. After the Tool is saved in this section, a Callback URL will be generated in the Authentication section of the Tool. Copy that URL.

  17. Edit the OAuth application on the Databricks account, and update it with the Callback URL from the previous step.

Setup is now complete. Refer to the Databricks end user documentation for information on testing this tools in the agent builder.