mrs__ExecuteSql
Submit and execute a SQL statement on a specified MRS cluster to query or process data, supporting Presto SQL and optional result archiving.
Instructions
[MRS] 在MRS集群中提交并执行一条SQL语句。
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": {
"cluster_id": "<cluster_id>",
"project_id": "<project_id>",
"sql_content": "<sql_content>",
"sql_type": "<sql_type>"
},
"name": "mrs__ExecuteSql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| database | No | 执行SQL所在的数据库,默认为default。 | |
| sql_type | Yes | SQL类型。目前仅支持“presto”类型的SQL。 | |
| cluster_id | Yes | 集群ID。获取方法,请参见[获取集群ID](https://support.huaweicloud.com/api-mrs/mrs_02_9001.html)。 | |
| project_id | Yes | 项目编号。获取方法,请参见[获取项目ID](https://support.huaweicloud.com/api-mrs/mrs_02_0011.html)。 | |
| sql_content | Yes | 待执行的SQL语句。 | |
| archive_path | No | SQL执行结果的转储文件夹。 |