execute_select
Execute read-only SELECT queries on IBM watsonx.data by supplying SQL, catalog, schema, and engine to retrieve query results including columns and rows.
Instructions
Execute read-only SELECT queries against watsonx.data.
Args: sql: SQL SELECT query to execute (must start with SELECT) catalog_name: Target catalog (e.g., "iceberg_data", "tpch") schema_name: Default schema for unqualified table names engine_id: Engine to run query on (from list_engines, must be running) limit: Max rows to return (default: 500 if no LIMIT in query). Note: Using high limits will consume more tokens.
Returns: Dict with: - query_id: Unique query identifier - columns: List of {name, type} objects - rows: List of row data (list of lists) - row_count: Number of rows returned - execution_time_ms: Query duration in milliseconds - catalog_name, schema_name: Echo of inputs
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | ||
| catalog_name | Yes | ||
| schema_name | Yes | ||
| engine_id | Yes | ||
| limit | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||