hue_execute_query
Execute SQL queries on Hadoop Hue to retrieve data using Hive, SparkSQL, or Impala dialects with configurable timeout and batch size.
Instructions
Execute a SQL query on Hue and return the results.
This tool executes a SQL statement, waits for completion, and fetches all results.
Use this for SELECT queries where you want to retrieve data.
Args:
statement: The SQL statement to execute (e.g., "SELECT * FROM table LIMIT 100")
dialect: SQL dialect to use - 'hive', 'sparksql', or 'impala' (default: 'hive')
timeout: Maximum time to wait for query completion in seconds (default: 300)
batch_size: Number of rows to fetch per batch for pagination (default: 1000)
Returns:
QueryResult with headers, rows, and row_count
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": {
"statement": "<statement>"
},
"name": "hue_execute_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| statement | Yes | ||
| dialect | No | hive | |
| timeout | No | ||
| batch_size | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | Query result rows as nested lists | |
| headers | Yes | Column headers from the query result | |
| row_count | Yes | Total number of rows returned |