Snowflake Integration
The Snowflake integration lets agents run SQL queries against your Snowflake data warehouse. Use it to look up records, check KPIs, or fetch any structured data your agents need during a conversation.
Authentication
Snowflake uses username and password authentication.
| Field | Required | Description |
|---|---|---|
| Account | Yes | Your Snowflake account identifier — e.g. xy12345.us-east-1 or xy12345.snowflakecomputing.com |
| Username | Yes | Snowflake login name |
| Password | Yes | Stored as a secret — never exposed to the agent |
| Warehouse | No | Compute warehouse to use (e.g. COMPUTE_WH) |
| Database | No | Default database for queries |
| Schema | No | Default schema |
| Role | No | Snowflake role to assume (e.g. ANALYST) |
Find your account identifier: Snowflake console → bottom-left account menu → copy the account locator.
Installing
- Go to your project → Integrations → Browse
- Find Snowflake and click Install
- Enter your Account, Username, and Password
- Optionally enter Warehouse, Database, Schema, and Role
- Select the Run Query action
- Click Install
Actions
run_query — Run Query
Executes a SQL query against Snowflake and returns the results.
Tool reference: {{tool:snowflake_run_query}}
Parameters:
| Parameter | Required | Description |
|---|---|---|
query | Yes | SQL query to execute. Use {{param}} placeholders for dynamic values |
warehouse | No | Override the warehouse set during installation |
database | No | Override the default database |
schema | No | Override the default schema |
role | No | Override the role |
Returns: Array of rows as objects, plus count (number of rows returned). Capped at 1,000 rows.
Supports: SELECT, INSERT, UPDATE, DELETE, MERGE. DML statements return [{"affected_rows": N}].
Using Snowflake in an agent
When a user asks for sales data or revenue figures, use
{{tool:snowflake_run_query}} to query the data warehouse.
Available tables (DATABASE.SCHEMA.TABLE):
- SALES_DB.PUBLIC.ORDERS — order-level data
- SALES_DB.PUBLIC.CUSTOMERS — customer records
Always filter by date range to keep queries fast.
Never return more than 20 rows to the user — summarise if the result is larger.
Limitations
- Results are capped at 1,000 rows per query
- Queries must complete within 60 seconds
- The Snowflake user must have USAGE privileges on the warehouse and SELECT on the tables being queried
- Key-pair authentication is not currently supported — use username/password
Troubleshooting
250001 Could not connect to Snowflake backend
The account identifier is incorrect. Try both the short form (xy12345) and the full form (xy12345.us-east-1.snowflakecomputing.com).
390100 Incorrect username or password
The credentials are wrong. Snowflake passwords are case-sensitive. Re-enter them carefully.
002003 SQL compilation error: Table not found
The database or schema is not set as a default and the query doesn't qualify the table name. Set a default database and schema during installation, or use fully qualified names: DATABASE.SCHEMA.TABLE.
Warehouse not running
The warehouse is suspended. Snowflake auto-resumes warehouses on query — if this persists, check that the user's role has OPERATE privilege on the warehouse.