Retrieves the status and results of an asynchronous SQL query.
Operation description
After you submit an SQL request using the SubmitAsyncSql operation, you can use this operation to poll the execution status of the request. You can set the polling interval to 1 second or longer. When the query is complete, use the GetAsyncSql operation to retrieve the results in pages.
Try it now
Test
RAM authorization
Request syntax
GET /asyncsql/{queryId} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| queryId |
string |
No |
The ID of the asynchronous SQL query. This ID is fixed throughout the SQL lifecycle. |
690C4F2A16FBD65C40000484_14 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
No |
The name of the project. |
sls-demo-project |
| offset |
integer |
No |
The offset for paginated results. |
0 |
| line |
integer |
No |
The number of results to return per page. The maximum value is 1000. |
100 |
Response elements
|
Element |
Type |
Description |
Example |
| AsyncSqlResponseData |
The data format of the response body. This corresponds to the protobuf format. |
The error_code and error_message parameters are valid only when the state parameter is FAILED.
Examples
Success response
JSON format
{
"id": "690C4F2A16FBD65C40000484_14",
"state": "FINISHED",
"AsyncSqlMetaPB": {
"result_rows": 12000,
"processed_rows": 10000000,
"elapsed_milli": 30000,
"cpu_sec": 0.2,
"cpu_cores": 10,
"progress": "Complete",
"keys": [
"[\"name\", \"age\", \"gender\"]"
]
},
"rows": [
[
"[\"Jimmy\", \"20\", \"male\"]"
]
],
"error_code": "InvalidQuery",
"error_message": "line 37:14: Column 'xyz' cannot be resolved"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.