By Datasource
Snowflake Actions
The Snowflake action pack contains the following actions:
- Search Snowflake with SQL
- Search Snowflake with Cortex
Overview
The Snowflake Action Pack in Glean enables users to perform both direct SQL queries and Cortex Analyst (natural language) queries against Snowflake data, seamlessly integrating Snowflake’s advanced analytics into Glean agents.
Key Features
- Natural Language Querying via Cortex Analyst: Users can issue natural language queries that are interpreted and run against Snowflake using the Cortex Analyst API for advanced analytics use cases.
- Direct SQL Execution: Allows users to write and execute raw SQL queries on Snowflake datasets directly from Glean.
- Semantic Model Support: Enables referencing semantic model definitions to guide analyst queries in natural language mode.
- User OAuth: Supports authenticated access, requiring users to log in with their credentials for data access.
Usage Instructions
Setup in Agent Builder
- Ensure the Snowflake Action Pack has been successfully set up by an admin.
- Create a new Glean Agent.
- Add the following steps to the agent:
- Step 1: Select Trigger type > Task.
- Step 2: Select the “Search Snowflake with Cortex” action. In the text box, add:
For Snowflake Cortex Analyst, send the following natural language query to the tool as is without any modification: [[query]].
Include a comma-separated list of semantic model files and the warehouse to be used by Cortex Analyst. - Step 3: Select the “Respond” action. In the text box, add:
Show me the results from the Search Snowflake with Cortex Analyst tool 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.
- Save your changes and share the agent with your teammates using the sharing link.
Usage Examples
- Revenue Insights in Natural Language:
What was the total revenue last month?
using the Cortex Analyst feature and a semantic model input. - Direct SQL Querying:
SELECT COUNT(*) FROM customers LIMIT 5
executed directly through SQL.
Known Limitations
- Does not support multi-turn conversations or visualizations through the Cortex Analyst interface.
- Glean does not control the quality of Snowflake Cortex Analyst responses (dependent on Snowflake’s API output).
- Advanced features of Snowflake Cortex Analyst (beyond simple query execution) are not supported.
Best Practices and Troubleshooting
- Always provide a warehouse for executing SQL queries with your agents, as some users may not have a default warehouse.
- In case of internal or external failure, the error is relayed back to the user to aid with troubleshooting.