explain_query
Analyze SQL query execution plans without running the query. Choose from logical, distributed, validate, or io plan types to understand query behavior and optimize performance.
Instructions
Get query execution plan without running the query in watsonx.data.
Args: engine_id: Presto or Prestissimo engine identifier statement: SQL query to explain. If query fails, consider using fully qualified table names (catalog.schema.table) engine_type: Engine type - "presto" or "prestissimo" (default: "presto") format: Output format - "json" or "text" type: Explain type - "logical", "distributed", "validate", or "io"
Returns: Dict with engine_id, engine_type, statement, plan, and full response
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| engine_id | Yes | ||
| statement | Yes | ||
| engine_type | No | presto | |
| format | No | ||
| type | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||