Querying Details About a Dataset Import Task
Function
This API is used to query details about a dataset import task.
Debugging
You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.
URI
GET /v2/{project_id}/datasets/{dataset_id}/import-tasks/{task_id}
| 
        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.  | 
     
| 
        task_id  | 
      
        Yes  | 
      
        String  | 
      
        Task ID.  | 
     
Request Parameters
None
Response Parameters
Status code: 200
| 
        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
Querying Details About an Import Task
GET https://{endpoint}/v2/{project_id}/datasets/{dataset_id}/import-tasks/{task_id}
 Example Responses
Status code: 200
OK
{
  "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,
  "update_ms" : 1606114833955,
  "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.