safe_query
Execute SELECT-only SQL queries on dataset tables with automatic blocking of destructive commands and a maximum 500-row limit.
Instructions
Execute a SELECT-only SQL query against a dataset table.
Safety: DROP/DELETE/UPDATE/INSERT/CREATE/ALTER/INSTALL/LOAD and other dangerous keywords are blocked. LIMIT is auto-applied if missing (max 500 rows).
Args: query_id: Dataset ID (for validation context) sql: A SELECT SQL query, e.g. "SELECT id, sentiment FROM social_posts LIMIT 10" limit: Max rows to return (capped at 500)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query_id | Yes | ||
| sql | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |