Explain Query
explain_queryRetrieve a SQL query execution plan from watsonx.data without executing the statement, so you can inspect, validate, and optimize queries before running them.
Instructions
Get query execution plan without running the query in watsonx.data.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"engine_id": "<engine_id>",
"statement": "<statement>"
},
"name": "explain_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Explain type - "logical", "distributed", "validate", or "io" | |
| format | No | Output format - "json" or "text" | |
| engine_id | Yes | Presto or Prestissimo engine identifier | |
| statement | Yes | SQL query to explain. If query fails, consider using fully qualified table names (catalog.schema.table) | |
| engine_type | No | Engine type - "presto" or "prestissimo" (default: "presto") | presto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||