Databricks action pack
Databricks actions enable Glean to interact directly with Databricks workspaces in supported Glean experiences.
This allows users to query Databricks using natural language or direct SQL and combine Databricks data with other connected apps and documents in Glean. Glean Assistant can query Databricks live without indexing any additional data.
When building an agent, you can add Databricks action in Agent Builder and pass the user query into the action step.
Supported tools
The Databricks action pack includes the following tools.
- Search Databricks with SQL: Run read-only SQL queries against Databricks and return tabular results.
- Search Databricks with Genie: Send a natural-language query to a Databricks Genie space and return the response.
Example use cases
Databricks actions support several common workflow patterns.
- Natural-language data exploration: A user can ask a question in plain language and query a Databricks Genie space live from Glean.
- Direct SQL workflows: An agent can send a SQL query to Databricks when the workflow needs direct query control.
- Cross-source reasoning: Glean users can combine Databricks data with other connected apps and documents in the same workflow.
Setup and configuration
Prerequisites
Before configuring Databricks actions, ensure you have the following.
- You must have administrative privileges in both Glean and Databricks.
- If you want to use Databricks Genie, you need a Genie Space ID.
- If you want to use Databricks SQL, you need a Databricks Warehouse ID.
- If you plan to use user OAuth for querying, your Databricks setup must support it.
Administrator steps
- In Glean, go to Admin console → Platform → Actions and add Databricks actions from the template library.
- In the Configuration section:
- Add the Default Genie Space ID if you want a default Genie target.
- Add the Default Warehouse ID if you want a default warehouse for SQL execution.
- Add the Host URL for your Databricks instance.
- In the Authenticate section:
- Create an OAuth app in Databricks.
- Copy the Client ID and Client Secret into Glean.
- Set the Authorization URL to
https://<host-url>/oidc/v1/authorize. - Set the Token URL to
https://<host-url>/oidc/v1/token. - Add the scope
all-apis,offline_access.
- Save the action pack.
- Copy the callback URL generated by Glean back into the Databricks OAuth app.
- Enable the pack for users: Use Edit settings under Enable Actions to make the pack available to the relevant users and supported Glean surfaces.
For detailed setup steps, see Databricks actions setup.
Agent builder
Step 1: Create the agent
- In Glean, open Agents from the left navigation.
- Click Create agent.
- In the creation modal, select Start from Scratch.
- Enter an agent name, for example, Databricks Query Agent.
Step 2: Configure the trigger
- In the trigger area, select Input form.
- Add a Text input field.
- Set the field name to query.
- This creates the field reference
[[query]].
- This creates the field reference
Step 3: Add the Databricks Genie step
-
Add a new step after the trigger.
-
Search and select the Search Databricks with Genie or Search Databricks with SQL action.
-
In the action instructions or text box, enter the instructions as per your requirement.
Example:
For Databricks Genie, send the following natural language query to the tool as is without any modification: [[query]].
Step 4: Add the response step
-
Add another step after Search Databricks with Genie.
-
Select Respond.
-
In the instructions field, enter the instructions as per your requirement.
Example:
Show me the results from the Search Databricks with Genie step only. If there are more than 3 rows, show them as a table. Use the first row in the response from the tool for column names. Always show citations.
Step 5: Test and save
- Click Preview in the top-right corner.
- Enter a sample query in the query field.
- Run the agent and verify that:
- the Databricks action step runs successfully
- the response shows only the action output
- tabular results are formatted as a table when applicable
- citations are included
- Click Save.
Step 6: Share the agent
- Click Share in the Agent Builder header.
- Grant access to the right users, groups, or departments.
- Share the agent from the library after you are ready.
Known limitations
- Multi-turn conversations in the Databricks Genie query flow are not supported. If Genie responds with a clarification question, Glean does not pass the response back to Genie.
- Glean does not automatically retry queries on errors from the Genie API.