Retrieves query results.
Try it now
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
dlf:GetQueryResult | get | *All Resource
| None | None |
Request syntax
GET /webapi/query/getQueryResult HTTP/1.1Request parameters
Parameter | Type | Required | Description | Example |
QueryId | string | No | The query ID. Note Call the SubmitQuery operation to obtain the query ID. | Q-41676378709440CE |
PageNumber | integer | No | The page number. | 1 |
PageSize | integer | No | The number of entries per page. The maximum value is 1000. | 100 |
Response elements
Element | Type | Description | Example |
object | The query results. | { "data" : } | |
Status | string | The query status. Valid values:
| AVAILABLE |
ResultTmpTable | string | The temporary table for the results. This parameter is not in use. | table |
Owner | integer | The UID of the Alibaba Cloud account that created the query. | 229167306180609*** |
ErrorMessage | string | The error message for the query. | Table or view not found: |
Progress | integer | The query progress. The value is between 0 and 100. | 99 |
Success | boolean | Indicates whether the request was successful. Valid values:
| true |
Schema | string | The fields and types in the table header of the query result. This parameter is returned only when the status is AVAILABLE. | [{"name":"id","type":"INT"},{"name":"student_name","type":"VARCHAR"}] |
ResultTmpDb | string | The temporary database for the results. This parameter is not in use. | db |
GmtModified | string | The time when the query result was updated. | 2022-05-09 16:19:09 |
JobCompleted | boolean | Indicates whether the query is complete. A value of false means you need to continue polling this operation. | true |
RowCount | integer | The total number of rows in the result. This parameter is returned only when the status is AVAILABLE. | 100 |
RegionId | string | The region ID. | cn-hangzhou |
EndTime | string | The time when the query was completed. | 2022-05-09 16:19:09 |
StartTime | string | The time when the query started. | 2022-05-09 16:18:09 |
RequestId | string | The request ID. | 1D2BCFBA-7639-59A9-817B-944EC1339279 |
Rows | string | The result information. This parameter is returned only when the status is AVAILABLE. The content is represented by a two-dimensional JSON array. | [[10,"Tom"],[11,"Jerry"]] |
Logs | string | The operational logs. | ["this is log"] |
GmtCreate | string | The time when the query was created. | 2022-05-09 16:18:09 |
Duration | integer | The runtime duration in milliseconds. | 8000 |
Sql | string | The original SQL statement that was executed. | select * from db.student |
RowCountOverLimit | boolean | Indicates whether the total number of rows in the result exceeds the maximum value. | false |
Id | string | The query ID. | Q-41676378709440CE |
TotalBytesProcessed | integer | The total volume of data scanned, in bytes. | 1024 |
Examples
Success response
JSON format
{
"Status": "AVAILABLE",
"ResultTmpTable": "table",
"Owner": 0,
"ErrorMessage": "Table or view not found:",
"Progress": 99,
"Success": true,
"Schema": "[{\"name\":\"id\",\"type\":\"INT\"},{\"name\":\"student_name\",\"type\":\"VARCHAR\"}]",
"ResultTmpDb": "db\n",
"GmtModified": "2022-05-09 16:19:09",
"JobCompleted": true,
"RowCount": 100,
"RegionId": "cn-hangzhou",
"EndTime": "2022-05-09 16:19:09",
"StartTime": "2022-05-09 16:18:09",
"RequestId": "1D2BCFBA-7639-59A9-817B-944EC1339279",
"Rows": "[[10,\"Tom\"],[11,\"Jerry\"]]",
"Logs": "[\"this is log\"]",
"GmtCreate": "2022-05-09 16:18:09",
"Duration": 8000,
"Sql": "select * from db.student",
"RowCountOverLimit": false,
"Id": "Q-41676378709440CE\n",
"TotalBytesProcessed": 1024
}Error codes
HTTP status code | Error code | Error message | Description |
400 | Query.ResultExpired | Query result cache expired, please export result in history query |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.