BulkImport()
This operation imports the prepared data files to Milvus. To learn how to prepare your data files, read Prepare Source Data.
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 NewBulkImportOption() to get its concrete implementation.
NewBulkImportOption
The signature of NewBulkImportOption() is as follows:
func NewBulkImportOption(uri string, collectionName string, files [][]string, ) *BulkImportOption
Parameter |
Description |
Type |
|---|---|---|
|
The URI of your Milvus instance. |
|
|
The name of a collection in the target cluster of this operation. |
|
|
The list of string lists, each string list contains a singular row-based file path or multiple column-based file paths. |
|
You can chain the following methods to append more parameters to the BulkImportOption struct.
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](BulkImport.md#BulkImportResponse)
Example