GetQueryResult
Retrieves the results of a data exploration query.
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.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| QueryId |
string |
No |
The query ID. Note
You can 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. Maximum value: 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 result table. This feature is currently unavailable. |
table |
| Owner |
integer |
The UID of the Alibaba Cloud account that created the query. |
229167306180609*** |
| ErrorMessage |
string |
The error message of the query. |
Table or view not found: |
| Progress |
integer |
The query progress. Valid values: 0 to 100. |
99 |
| Success |
boolean |
Indicates whether the request is successful. Valid values:
|
true |
| Schema |
string |
The header fields and data types of the query results. 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 results. This feature is currently unavailable. |
db |
| GmtModified |
string |
The time when the query results were updated. |
2022-05-09 16:19:09 |
| JobCompleted |
boolean |
Indicates whether the query is completed. A value of false indicates that you must continue to poll this operation. |
true |
| RowCount |
integer |
The total number of rows in the results. 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. The time is in the YYYY-MM-DD HH:mm:ss format. |
2022-05-09 16:19:09 |
| StartTime |
string |
The time when the query started. The time is in the YYYY-MM-DD HH:mm:ss format. |
2022-05-09 16:18:09 |
| RequestId |
string |
The request ID. |
1D2BCFBA-7639-59A9-817B-944EC1339279 |
| Rows |
string |
The returned results. 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 runtime logs. |
["this is log"] |
| GmtCreate |
string |
The time when the query was created. |
2022-05-09 16:18:09 |
| Duration |
integer |
The execution 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 results exceeds the maximum limit. |
false |
| Id |
string |
The query ID. |
Q-41676378709440CE |
| TotalBytesProcessed |
integer |
The total amount of scanned data, 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.