Submits an asynchronous SQL request.
Try it now
Test
RAM authorization
Request syntax
POST /asyncsql HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| project |
string |
No |
The idempotency token for the request. |
sls-demo-project |
| Accept |
string |
No |
The data format of the response. The value must be application/x-protobuf. |
application/x-protobuf |
| Accept-Encoding |
string |
No |
The compression format of the response. The value can be lz4. |
lz4 |
| body | SubmitAsyncSqlParams |
No |
The format of the response parameters. The value is `protobuf`. |
Response elements
|
Element |
Type |
Description |
Example |
| AsyncSqlResponseData |
The data returned in the response body. The data is in protobuf format. |
The error_code and error_message parameters are returned only when the state 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.