Skip to main content

GetImportProgress()

This operation gets the progress of the specified bulk-import job.

func GetImportProgress(ctx context.Context, option *GetImportProgressOption) (*GetImportProgressResponse, error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

GetImportProgressOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

GetImportProgressOption

This is a struct type. You can use NewCloudGetImportProgressOption() to get its concrete implementation.

NewCloudGetImportProgressOption

The signature of NewCloudGetImportProgressOption() is as follows:

func NewCloudGetImportProgressOption(uri string, jobID string, apiKey string, clusterID string) *GetImportProgressOption

Parameter

Description

Type

uri

The endpoint URL of the Zilliz Cloud Data Plane, which should be one of the follows:

string

jobID

The ID of the target data import job.

string

apiKey

A valid Zilliz Cloud API key with sufficient permissions to manipulate the cluster.

string

clusterID

The instance ID of the target cluster of this operation.

You can obtain the instance ID of a cluster from its details page in the Zilliz Cloud console.

string

You can chain the following methods to append more parameters to the BulkImportOption struct.

WithAPIKey

This method appends your Zilliz Cloud API key to the BulkImportOption struct. The signature of the method is as follows:

func (opt *BulkImportOption) WithAPIKey(key string) *BulkImportOption

Parameter

Description

Type

key

A valid Zilliz Cloud API key with sufficient permissions to manipulate the cluster.

string

grpc.CallOption

This interface provided by the gRPC Go library allows you to specify additional options or configurations when making requests. For possible implementations of this interface, refer to this file.

GetImportProgressResponse

The GetImportProgressResponse struct type is as follows:

type GetImportProgressResponse struct {
Status int `json:"status"`
Message string `json:"message"`
Data *ImportProgressData `json:"data"`
}

The struct type that appears in the GetImportProgressResponse struct type is as follows:

ImportProgressData

The ImportProgressData struct type is as follows:

type ImportProgressData struct {
CollectionName string `json:"collectionName"`
JobID string `json:"jobId"`
CompleteTime string `json:"completeTime"`
State string `json:"state"`
Progress int64 `json:"progress"`
ImportedRows int64 `json:"importedRows"`
TotalRows int64 `json:"totalRows"`
Reason string `json:"reason"`
FileSize int64 `json:"fileSize"`
Details []*ImportProgressDetail `json:"details"`
}

The struct type that appears in the ImportProgressData struct type is as follows:

ImportProgressDetail

The ImportProgressDetail struct type is as follows:

type ImportProgressDetail struct {
FileName string `json:"fileName"`
FileSize int64 `json:"fileSize"`
Progress int64 `json:"progress"`
CompleteTime string `json:"completeTime"`
State string `json:"state"`
ImportedRows int64 `json:"importedRows"`
TotalRows int64 `json:"totalRows"`
}

Return

*GetImportProgressResponse

Example