Cancels a Spark SQL execution.
Operation description
Public endpoint of a region:
adb.<region-id>.aliyuncs.com. Example:adb.ap-southeast-1.aliyuncs.com.VPC endpoint of a region:
adb-vpc.<region-id>.aliyuncs.com. Example:adb-vpc.ap-southeast-1.aliyuncs.com.
If you encounter a 409 error when initiating requests from China North 1 (Qingdao), China South 1 (Shenzhen), China South 3 (Guangzhou), or Hong Kong (China), contact technical support.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:CancelSparkWarehouseBatchSQL |
update |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| QueryId |
string |
Yes |
The execution ID of the Spark SQL. |
sq202501011001s**** |
| DBClusterId |
string |
No |
The cluster ID. |
amv-uf6485635f*** |
| Agency |
string |
No |
The client name for auxiliary recording. The value is a meaningful string of up to 16 characters. |
DMS |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response struct. |
||
| RequestId |
string |
The request ID. |
771C5FAA-530F-52F7-B84D-EBAD45*** |
| Data | SparkBatchSQL |
The returned result. |
123 |
Examples
Success response
JSON format
{
"RequestId": "771C5FAA-530F-52F7-B84D-EBAD45***",
"Data": {
"Uid": 0,
"QuerySubmissionTime": 1723521767000,
"Query": "SELECT * FROM db.tb",
"QueryId": "sq172352176****",
"Schema": "default",
"QueryEndTime": 1723521767000,
"DBClusterId": "amv-bp17s73f016****",
"QueryState": "RUNNING",
"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",
"QueryStartTime": 1723521767000,
"ResourceGroupName": "spark_rg"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | Spark.SQL.NotFoundExecutableSQLError | No executable statements are submitted. Please check the input SQL. | The SQL information in the Spark job does not contain executable statements. |
| 400 | Spark.SQL.BlankError | Input sql can not be blank string. | The submitted SQL statement cannot be empty. |
| 400 | Spark.InvalidParameter | Invalid parameter value: %s | Incorrect input parameter:%s. |
| 400 | Spark.InvalidState | The object of the operation is in an invalid state: %s | The operation object is invalid. |
| 500 | Spark.ServerError | The Spark control component system encountered an error, please create a ticket to solve the problem or concat the supported engineer on duty. Error message: %s | An error occurred on the Spark control component system. Submit a ticket or contact technical support. |
| 404 | Spark.App.NotFound | The Spark application %s is not found. | The specified Spark application was not found. |
| 404 | Spark.ObjectNotFound | The object is not found. More information: %s | The target object does not exist. Associated information: %s. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.