メインコンテンツまでスキップ

BulkImport()

This operation imports the prepared data files to Zilliz Cloud. To learn how to prepare your data files, read Prepare Data Import.

func BulkImport(ctx context.Context, option *BulkImportOption) (*BulkImportResponse, error)

Request Parameters

Parameter

Description

Type

ctx

Context for the current call to work.

context.Context

option

Optional parameters of the methods.

BulkImportOption

callOpts

Optional parameters for calling the methods.

grpc.CallOption

BulkImportOption

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

</include target="zilliz">

NewCloudBulkImportOption

The signature of NewCloudBulkImportOption() is as follows:

func NewCloudBulkImportOption(uri string, collectionName string, apiKey string, objectURL string, clusterID string, accessKey string, secretKey string, ) *BulkImportOption

Parameter

Description

Type

uri

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

string

collectionName

The name of a collection in the target cluster of this operation.

string

apiKey

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

string

objectURL

The URL of your data files in one of your block storage buckets. The following are some examples of renowned block storage services:

  • Google Cloud Storage

    gs://{bucket-name}/{object-path}/

  • AWS S3

    s3://{bucket-name}/{object-path}/

    For details, refer to Storage Options.

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

accessKey

The access key that is used to authenticate access to your data files.

string

secretKey

The secret key that is used to authenticate access to your data files.

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

</include>

WithPartition

This method specifies the name of the target partition to the BulkImportOption struct. The signature of the method is as follows:

func (opt *BulkImportOption) WithPartition(partitionName string) *BulkImportOption

Parameter

Description

Type

partitionName

The name of the target partition of this operation.

string

WithOption

This method appends extra options in key-value pairs to the BulkImportOption struct. The signature of the method is as follows:

func (opt *BulkImportOption) WithOption(key, value string) *BulkImportOption

Parameter

Description

Type

key

An extra BulkImportOption key

string

value

The value of the above extra key.

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.

BulkImportResponse

The BulkImportResponse struct type is as follows:

type BulkImportResponse struct {
Status int `json:"status"`
Message string `json:"message"`
Data struct {
JobID string `json:"jobId"`
} `json:"data"`
}

Return

*BulkImportResponse

Example

</include target="milvus">

</include>

</include target="zilliz">

</include>