Search Snowflake with SQL
The Search Snowflake with SQL action lets Glean agents run direct, read-only SQL against Snowflake and return the results to downstream steps.
Use this action when you want full control over the SQL being executed while still composing the response in a Glean agent (for example, summarizing the data, sending a message, or updating another system).
Limitations
-
The action validates SQL to prevent writes and relies on Snowflake role permissions.
-
If no warehouse is provided and the user has no default warehouse, the action fails.
-
Missing privileges return authorization or object does not exist errors.
-
Snowflake errors surface back to the agent run and this is dependent on Snowflake service health.
Prerequisites
-
An admin has enabled and configured the Snowflake Actions action pack in the Glean Admin Console.
-
Snowflake role and permissions
-
A Snowflake role, for example,
GLEAN_QUERY_SNOWFLAKE_ROLEwith at least:-
USAGEon target databases and schemas. -
SELECTon the tables or views referenced in your SQL. -
USAGEon the warehouse used by the action.
-
-
-
User authentication
- Users who run this action have authenticated to Snowflake via OAuth from Glean.
Supported parameters
| Parameter | Type | Required | Recommended source | Description |
|---|---|---|---|---|
| Query | String | Yes | Dynamic (user input or step) | Full read-only SQL statement to execute (for example, SELECT COUNT(*) FROM ANALYTICS.CUSTOMERS LIMIT 5). |
| Warehouse | String | Yes | Fixed in step configuration | Snowflake warehouse to execute the SQL. |
Usage example
Scenario: Simple reporting query
Goal: run a fixed report query and present results in the agent response.
Setup in Agent Builder:
-
Add a trigger step, for example, an input form with a query in the text field.
-
Add the Search Snowflake with SQL action and configure:
-
Query: a fixed SQL statement, for example,
SELECT COUNT(*) AS customer_count FROM ANALYTICS.CUSTOMERS. -
Warehouse: a reporting warehouse your role can use.
-
-
Add a Respond step to display the results as a table or summary.
Resulting behavior:
-
The action executes the SQL in Snowflake and returns the result set.
-
The Respond step formats or summarizes the output.