Skip to main content

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.

FieldRequiredDescription
AccountYesYour Snowflake account identifier — e.g. xy12345.us-east-1 or xy12345.snowflakecomputing.com
UsernameYesSnowflake login name
PasswordYesStored as a secret — never exposed to the agent
WarehouseNoCompute warehouse to use (e.g. COMPUTE_WH)
DatabaseNoDefault database for queries
SchemaNoDefault schema
RoleNoSnowflake role to assume (e.g. ANALYST)

Find your account identifier: Snowflake console → bottom-left account menu → copy the account locator.

Installing

  1. Go to your project → IntegrationsBrowse
  2. Find Snowflake and click Install
  3. Enter your Account, Username, and Password
  4. Optionally enter Warehouse, Database, Schema, and Role
  5. Select the Run Query action
  6. Click Install

Actions

run_query — Run Query

Executes a SQL query against Snowflake and returns the results.

Tool reference: {{tool:snowflake_run_query}}

Parameters:

ParameterRequiredDescription
queryYesSQL query to execute. Use {{param}} placeholders for dynamic values
warehouseNoOverride the warehouse set during installation
databaseNoOverride the default database
schemaNoOverride the default schema
roleNoOverride 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.