base_readQuery
Execute a user-provided SQL query against Teradata and return the results. Use only when explicit SQL is supplied.
Instructions
Execute a user-provided SQL query against Teradata and return the results. Use this tool ONLY when the user supplies an explicit SQL statement or a request that includes filter conditions (WHERE clause, aggregations, JOINs, etc.). Do NOT use for simply browsing or sampling rows from a table — use base_tablePreview for that. The sql parameter is required and must contain the full SQL text.
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 |