base_readQuery
Execute parameterized SQL queries, persist large result sets as volatile tables, and retrieve up to 50,000 rows with truncated data notification.
Instructions
Execute a SQL query via SQLAlchemy, bind parameters if provided (prepared SQL), and return the fully rendered SQL (with literals) in metadata.
Arguments: sql - SQL text, with optional bind-parameter placeholders persist - Set to True to persist the results as a table and reuse it later. Recommended for large result sets. row_limit - Maximum rows to return (default 1000, ceiling 50000). Pass a higher value when you need more rows.
When the response metadata contains 'truncated: true', more rows exist beyond the limit. To get more data:
Pass a higher row_limit (up to 50000) to retrieve more rows in the response.
Use persist=true to write all rows to a volatile table and query it directly — this bypasses the row limit entirely and is the recommended approach for large result sets.
Returns: ResponseType: formatted response with query results + metadata (includes 'volatile_table' field in metadata if persist=True) (includes 'truncated' and 'row_limit' in metadata when results are capped)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | No | ||
| persist | No | ||
| row_limit | No |