Queries the execution result of a Spark SQL statement.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- For mandatory resource types, indicate with a prefix of * .
- If the permissions cannot be granted at the resource level,
All Resourcesis used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
| Operation | Access level | Resource type | Condition key | Associated operation |
|---|---|---|---|---|
| adb:GetSparkWarehouseBatchSQL | get | *All Resources * |
| none |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| QueryId | string | Yes | The query ID of the Spark SQL statement. | sq2024123***** |
| DBClusterId | string | No | The cluster ID. | amv-uf6485635f*** |
| Agency | string | No | The name of the client, which can be up to 16 characters in length. Specify a descriptive name that makes it easy to identify. | DMS |
Response parameters
Examples
Sample success responses
JSONformat
{
"RequestId": "3D44EDA0-A9DC-580D-9B5A-019370C075F4",
"Data": {
"QueryId": "sq172352176****",
"QueryState": "RUNNING",
"QuerySubmissionTime": 1723521767000,
"QueryStartTime": 1723521767000,
"QueryEndTime": 1723521767000,
"Schema": "default",
"Uid": 0,
"DBClusterId": "amv-bp17s73f016****",
"ResourceGroupName": "spark_rg",
"Query": "SELECT * FROM db.tb",
"Statements": [
{
"ResultUri": "oss://yourbucket/result.json",
"EndTime": 1723521767000,
"AppId": "s20240122jsdx****",
"StatementId": "sq1723521767****-0001",
"State": "RUNNING",
"StartTime": 1723521767000,
"Error": "table is not found",
"Code": "SELECT 100",
"Result": "+---+-----+\n|age| name|\n+---+-----+\n| 14| Tom|\n| 23|Alice|\n+---+-----+"
}
],
"ErrMessage": "schema is not found"
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 400 | Spark.InvalidState | The object of the operation is in an invalid state: %s | The operation object is invalid. |
| 400 | Spark.InvalidParameter | Invalid parameter value: %s | Incorrect input parameter:%s. |
| 403 | Spark.Forbidden | No permissions to access the resources: %s | Insufficient permissions to access the related resources. Information that you want to access: %s. |
| 404 | Spark.ObjectNotFound | The object is not found. More information: %s | - |
For a list of error codes, visit the Service error codes.
