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 |
---|---|---|
| Context for the current call to work. |
|
| Optional parameters of the methods. |
|
| Optional parameters for calling the methods. |
|
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 |
---|---|---|
| The endpoint URL of the Zilliz Cloud Data Plane, which should be one of the follows: |
|
| The name of a collection in the target cluster of this operation. |
|
| A valid Zilliz Cloud API key with sufficient permissions to manipulate the cluster. |
|
| The URL of your data files in one of your block storage buckets. The following are some examples of renowned block storage services:
|
|
| 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. |
|
| The access key that is used to authenticate access to your data files. |
|
| The secret key that is used to authenticate access to your data files. |
|
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 |
---|---|---|
| A valid Zilliz Cloud API key with sufficient permissions to manipulate the cluster. |
|
</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 |
---|---|---|
| The name of the target partition of this operation. |
|
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 |
---|---|---|
| An extra |
|
| The value of the above extra key. |
|
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>