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.
-
-
A Snowflake role, for example,
-
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.
-
Query: a fixed SQL statement, for example,
- Add a Respond step to display the results as a table or summary.
- The action executes the SQL in Snowflake and returns the result set.
- The Respond step formats or summarizes the output.
Troubleshooting
Warehouse missing or not authorized
Warehouse missing or not authorized
Object does not exist or is not authorized
Object does not exist or is not authorized
HTML “File not Found” error from Snowflake
HTML “File not Found” error from Snowflake
- Possible cause: The Snowflake Actions pack is misconfigured (account identifier mismatch).
- Fix: Copy the account identifier from the Snowflake OAuth URLs into the action pack configuration and re-authenticate.
Query outside allowed schemas fails
Query outside allowed schemas fails
- Possible cause: The role lacks
USAGE/SELECTon referenced objects. - Fix: Restrict queries to allowed objects or update grants for the integration role.
FAQs
Does this action support write queries (INSERT, UPDATE, DELETE, DDL)?
Does this action support write queries (INSERT, UPDATE, DELETE, DDL)?
No. The action validates SQL as read-only and uses Snowflake roles scoped for reporting access.
Which warehouse does the action use?
Which warehouse does the action use?
The action uses the warehouse set in the action configuration. If none is set and the user has no default, Snowflake returns an error.
When should I use this action versus Search Snowflake with Cortex?
When should I use this action versus Search Snowflake with Cortex?
Use Search Snowflake with SQL when you want direct SQL control. Use Search Snowflake with Cortex when you want natural language questions and generated SQL.