Views details of asynchronous import and export tasks.

For more information about how to asynchronously submit an import and export tasks, see Asynchronously submit an import or export task.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeLoadTasksRecords

The operation that you want to perform. Set the value to DescribeLoadTasksRecords.

DBClusterId String Yes am-bp**********

The ID of a cluster.

Note You can call the DescribeDBClusters operation to view the details (including cluster IDs) of all AnalyticDB for MySQL clusters in the destination region.
StartTime String Yes 2021-05-18T06:00:00Z

The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note We recommend that you set the query start time to any point in time within 30 days.
EndTime String Yes 2021-05-18T06:30:00Z

The end of the time range to query. The end time must be later than the start time. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

DBName String No adb_demo

The name of the database involved in the import or export task.

PageSize Integer No 30

The number of entries to return on each page. Default value: 30. Valid values:

  • 30
  • 50
  • 100
PageNumber Integer No 1

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

Order String No [{"Field":"CreateTime", "Type":"desc"}]

The order in which to sort the retrieved records by field. Specify the field used to sort the retrieved records and the order type in the JSON format. Example: [{"Field":"CreateTime", "Type":"desc"}]

Note
  • In the example, Field indicates the field used to sort the retrieved records. Valid values of Field: State, CreateTime, DBName, ProcessID, UpdateTime, JobName, and ProcessRows.
  • Type indicates the sort type. Valid values of Type: Desc and Asc. A value of Desc indicates a descending order. A value of Asc indicates an ascending order. The values are case-insensitive.
State String No FINISH

The status of the asynchronous import or export task to be queried. Valid values:

  • INIT: indicates that the task is being initialized.
  • RUNNING: indicates that the task is running.
  • FINISH: indicates that the task is successful.
  • FAILED: indicates that the task fails.

Response parameters

Parameter Type Example Description
TotalCount String 1

The total number of merged streams.

PageSize String 30

The number of entries returned on the current page.

RequestId String C60B05DB-2B77-421A-98E9-92C20E******

The ID of the request.

PageNumber String 1

The page number of the returned page.

DBClusterId String am-bp**********

The ID of a cluster.

LoadTasksRecords Array of LoadTaskRecord

An array that consists of the information of tasks.

Sql String insert overwrite into courses_external_table\nselect * from courses

The SQL statement used in the task.

State String FINISH

The status of the task.

CreateTime String 2021-05-18 18:47:27.0

The start time of the task. It is accurate to milliseconds. The time is in the yyyy-MM-ddTHH:mm:ss.SSSZ format.

DBName String adb_demo

The name of the database involved in the task.

ProcessID String 2021051818472717201616624903453******

The ID of the process.

UpdateTime String 2021-05-18 18:47:31.0

The time when the task status was updated. It is accurate to milliseconds. The time is in the yyyy-MM-ddTHH:mm:ss.SSSZ format.

JobName String 2021051818472717201616624903453******

The ID of the task.

ProcessRows Long 6

The number of rows that are processed in the task.

Examples

Sample requests

http(s)://ads.aliyuncs.com/?&Action=DescribeLoadTasksRecords
&DBClusterId=am-bp**********
&StartTime=2021-05-18T06:00:00Z
&EndTime=2021-05-18T06:30:00Z
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeLoadTasksRecordsResponse>
    <TotalCount>1</TotalCount>
    <LoadTasksRecords>
        <ProcessRows>6</ProcessRows>
        <State>FINISH</State>
        <CreateTime>2021-05-18 18:47:27.0</CreateTime>
        <JobName>2021051818472717201616624903453******</JobName>
        <UpdateTime>2021-05-18 18:47:31.0</UpdateTime>
        <DBName>adb_demo</DBName>
        <ProcessID>2021051818473117201616624903453******</ProcessID>
        <Sql> insert overwrite into courses_external_table
select * from courses</Sql>
    </LoadTasksRecords>
    <RequestId>C60B05DB-2B77-421A-98E9-92C20E******</RequestId>
    <PageSize>30</PageSize>
    <PageNumber>1</PageNumber>
    <DBClusterId>am-bp**********</DBClusterId>
</DescribeLoadTasksRecordsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "LoadTasksRecords" : [ {
    "ProcessRows" : 6,
    "State" : "FINISH",
    "CreateTime" : "2021-05-18 18:47:27.0",
    "JobName" : "2021051818472717201616624903453******",
    "UpdateTime" : "2021-05-18 18:47:31.0",
    "DBName" : "adb_demo",
    "ProcessID" : "2021051818473117201616624903453******",
    "Sql" : " insert overwrite into courses_external_table\nselect * from courses"
  } ],
  "RequestId" : "C60B05DB-2B77-421A-98E9-92C20E******",
  "PageSize" : 30,
  "PageNumber" : 1,
  "DBClusterId" : "am-bp**********"
}

Error codes

HttpCode Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified cluster ID does not exist. Check whether the cluster ID is valid.

For a list of error codes, visit the API Error Center.