Domain name for API request: dlc.tencentcloudapi.com.
This API is used to query the result of a task.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common Params. The value used for this API: DescribeTaskResult. |
Version | Yes | String | Common Params. The value used for this API: 2021-01-25. |
Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
TaskId | Yes | String | Unique task ID |
NextToken | No | String | The pagination information returned by the last response. This parameter can be omitted for the first response, where the data will be returned from the beginning. The data with a volume set by the MaxResults field is returned each time. |
MaxResults | No | Integer | Maximum number of returned rows. Value range: 0–1,000. Default value: 1,000. |
Parameter Name | Type | Description |
---|---|---|
TaskInfo | TaskResultInfo | The queried task information. If the returned value is empty, the task with the entered task ID does not exist. The task result will be returned only if the task status is 2 (succeeded).Note: This field may return null, indicating that no valid values can be obtained. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to query the result of a task. 1,000 rows of data are returned each time.
POST / HTTP/1.1
Host: dlc.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTaskResult
<Common request parameters>
{
"TaskId": "9e20f9c021cb11ec835f5254006c64af",
"NextToken": ""
}
{
"Response": {
"RequestId": "9328049f-30bc-4feb-aecf-e3b4ff2d1b00",
"TaskInfo": {
"TaskId": "9e20f9c021cb11ec835f5254006c64af",
"DatasourceConnectionName": "CosDataCatalog",
"DatabaseName": "auth_test",
"SQL": "SELECT * FROM `auth_test`.`hive_test` LIMIT 10",
"SQLType": "DQL",
"State": 2,
"DataAmount": 850363,
"UsedTime": 1761,
"TotalTime": 2000,
"OutputPath": "cosn://dlc-nj-1258469122/test/DLCQueryResults/2021/09/30/9e20f9c021cb11ec835f5254006c64af/",
"CreateTime": "1632991895728",
"OutputMessage": "success",
"RowAffectInfo": "59378 rows affected (1.761000 seconds)",
"ResultSchema": [
{
"Name": "a",
"Type": "integer",
"Comment": "",
"Precision": 0,
"Scale": 0,
"Nullable": "NULLABLE"
},
{
"Name": "b",
"Type": "varchar",
"Comment": "",
"Precision": 0,
"Scale": 0,
"Nullable": "NULLABLE"
}
],
"ResultSet": "[[\"3\",\"kk\"],[\"3\",\"kk\"],[\"9143\",\" \\\"28992\\\"\"],[\"19048\",\" \\\"11266\\\"\"],[\"16711\",\" \\\"17422\\\"\"],[\"3816\",\" \\\"18501\\\"\"],[\"16428\",\" \\\"13774\\\"\"],[\"30190\",\" \\\"5177\\\"\"],[\"24824\",\" \\\"19479\\\"\"],[\"9709\",\" \\\"5532\\\"\"]]",
"NextToken": "",
"Percentage": 100,
"ProgressDetail": "[{\"jobId\":\"0\",\"stages\":[{\"stageId\":\"0\",\"schedule\":1},{\"stageId\":\"1\",\"schedule\":1},{\"stageId\":\"2\",\"schedule\":1},{\"stageId\":\"3\",\"schedule\":1}],\"jobState\":\"\"}]",
"DisplayFormat": "table"
}
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
FailedOperation | The operation failed. |
FailedOperation.HttpClientDoRequestFailed | The HTTP client request failed. |
InternalError | An internal error occurred. |
InvalidParameter | The parameter is incorrect. |
InvalidParameter.InvalidMaxResults | Invalid maximum number of results. |
InvalidParameter.InvalidTaskId | The taskid is invalid. |
本页内容是否解决了您的问题?