run_query
Execute read-only SQL SELECT queries on a warehouse, returning rows as JSON with a default cap of 200 (max 5000). Aggregate counts in SQL to stay within row limits.
Instructions
Run a read-only SQL SELECT against the warehouse and return rows as JSON. Only SELECT (and WITH ... SELECT) is permitted; a single statement per call. Results are capped at 200 rows by default and 5000 at most — aggregate in SQL rather than pulling rows and counting them yourself.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | A single SELECT statement. | |
| limit | No | Row cap (default 200). |