snowflake_query
Execute SQL on Snowflake through the omni-dev daemon, returning result sets as YAML. Supports multi-statement scripts and optional per-query warehouse, role, database, and schema.
Instructions
Run SQL against Snowflake and return the result set(s) as YAML. Mirrors omni-dev snowflake query. Multi-statement scripts (;-separated) are supported: the reply is a statements array with one {columns, rows} result set per statement. The query runs through the omni-dev daemon, which multiplexes authenticated (account, user) sessions — so the daemon must be running (omni-dev daemon start). First-time use of an (account, user) authenticates via external-browser SSO on the daemon host (a browser may open there). account/user default to SNOWFLAKE_ACCOUNT/SNOWFLAKE_USER (and settings.json) when omitted; warehouse/role/database/schema are optional per-query context.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | SQL to execute. Required. | |
| role | No | Per-query role (`USE ROLE`). | |
| user | No | Authenticating user. Falls back to `SNOWFLAKE_USER` / settings.json. | |
| schema | No | Per-query schema (`USE SCHEMA`). | |
| socket | No | Control-socket path override. Defaults to the per-user runtime location. | |
| account | No | Target account. Falls back to `SNOWFLAKE_ACCOUNT` / settings.json. | |
| database | No | Per-query database (`USE DATABASE`). | |
| warehouse | No | Per-query warehouse (`USE WAREHOUSE`). |