Querying the Dataset Import Task List
Function
This API is used to query the dataset import task list by page.
Debugging
You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/datasets/{dataset_id}/import-tasks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dataset_id |
Yes |
String |
Dataset ID. |
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID and Name. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
limit |
No |
Integer |
Maximum number of records returned on each page. The value ranges from 1 to 100. The default value is 10. |
offset |
No |
Integer |
Start page of the paging list. The default value is 0. |
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
import_tasks |
Array of ImportTaskStatusResp objects |
List of import tasks. |
total_count |
Integer |
Number of import tasks. |
Parameter |
Type |
Description |
---|---|---|
annotated_sample_count |
Long |
Number of labeled samples. |
create_time |
Long |
Time when a task is created. |
data_source |
DataSource object |
Data source. |
dataset_id |
String |
Dataset ID. |
elapsed_time |
Long |
Task running time, in seconds. |
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
file_statistics |
FileCopyProgress object |
File replication progress |
finished_file_count |
Long |
Number of files that have been transferred. |
finished_file_size |
Long |
Size of the file that has been transferred, in bytes. |
import_path |
String |
OBS path or manifest path to be imported.
|
import_type |
Integer |
Import mode. Options:
|
imported_sample_count |
Long |
Number of imported samples. |
imported_sub_sample_count |
Long |
Number of imported subsamples. |
processor_task_id |
String |
ID of a preprocessing task. |
processor_task_status |
Integer |
Status of a preprocessing task. |
status |
String |
Status of an import task. Options:
|
task_id |
String |
Task ID. |
total_file_count |
Long |
Total number of files. |
total_file_size |
Long |
Total file size, in bytes. |
total_sample_count |
Long |
Total number of samples. |
total_sub_sample_count |
Long |
Total number of subsamples generated from the parent samples. |
unconfirmed_sample_count |
Long |
Number of samples to be confirmed. |
update_ms |
Long |
Time when a task is updated. |
Parameter |
Type |
Description |
---|---|---|
data_path |
String |
Data source path. |
data_type |
Integer |
Data type. Options:
|
schema_maps |
Array of SchemaMap objects |
Schema mapping information corresponding to the table data. |
source_info |
SourceInfo object |
Information required for importing a table data source. |
with_column_header |
Boolean |
Whether the first row in the file is a column name. This field is valid for the table dataset. Options:
|
Parameter |
Type |
Description |
---|---|---|
dest_name |
String |
Name of the destination column. |
src_name |
String |
Name of the source column. |
Parameter |
Type |
Description |
---|---|---|
cluster_id |
String |
MRS cluster ID. You can log in to the MRS console to view the information. |
cluster_mode |
String |
Running mode of an MRS cluster. Options:
|
cluster_name |
String |
MRS cluster name You can log in to the MRS console to view the information. |
database_name |
String |
Name of the database to which the table dataset is imported. |
input |
String |
HDFS path of the table data set. For example, /datasets/demo. |
ip |
String |
IP address of your GaussDB(DWS) cluster. |
port |
String |
Port number of your GaussDB(DWS) cluster. |
queue_name |
String |
DLI queue name of a table dataset. |
subnet_id |
String |
Subnet ID of an MRS cluster. |
table_name |
String |
Name of the table to which a table dataset is imported. |
user_name |
String |
Username, which is mandatory for GaussDB(DWS) data. |
user_password |
String |
User password, which is mandatory for GaussDB(DWS) data. |
vpc_id |
String |
ID of the VPC where an MRS cluster resides. |
Example Requests
Obtaining the Dataset Import Task List
GET https://{endpoint}/v2/{project_id}/datasets/{dataset_id}/import-tasks
Example Responses
Status code: 200
OK
{ "total_count" : 1, "import_tasks" : [ { "status" : "COMPLETED", "task_id" : "gfghHSokody6AJigS5A_RHJ1zOkIoI3Nzwxj8nh", "dataset_id" : "gfghHSokody6AJigS5A", "import_path" : "obs://test-obs/daoLu_images/animals/", "import_type" : 0, "total_sample_count" : 20, "imported_sample_count" : 20, "annotated_sample_count" : 20, "total_sub_sample_count" : 0, "imported_sub_sample_count" : 0, "total_file_size" : 0, "finished_file_count" : 0, "finished_file_size" : 0, "total_file_count" : 0, "create_time" : 1606114833874, "elapsed_time" : 2 } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
401 |
Unauthorized |
403 |
Forbidden |
404 |
Not Found |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot