Skip to main content

bulkImport()

Creates a bulk import job from prepared data files in Milvus or Zilliz Cloud.

java
public static String bulkImport(String url, BaseImportRequest request)

Request Syntax

Use this request when importing bucket data into Zilliz Cloud.

java
CloudImportRequest.builder()
.apiKey(apiKey)
.clusterId(clusterId)
.projectId(projectId)
.regionId(regionId)
.dbName(dbName)
.collectionName(collectionName)
.partitionName(partitionName)
.objectUrls(objectUrls)
.objectUrl(objectUrl)
.accessKey(accessKey)
.secretKey(secretKey)
.token(token)
.options(options)
.build();

PARAMETERS:

  • apiKey (String) -
    Authentication credential. Use the Zilliz Cloud API key for Cloud requests or username:password for Milvus requests.

  • clusterId (String) -
    Cluster identifier for cluster-based deployments. For project database deployments, use projectId and regionId instead.

  • projectId (String) -
    Project identifier for project database deployments. Use with regionId instead of clusterId.

  • regionId (String) -
    Region identifier for project database deployments. Use with projectId instead of clusterId.

  • dbName (String) -
    Default: default
    Target database name for Dedicated deployments.

  • collectionName (String) -
    Target collection name.

  • partitionName (String) -
    Default: default
    Target partition name when the collection does not use a partition key.

  • objectUrls (List<List<String>>) -
    Bucket folders or files to import. Supports multiple paths and file groups.

  • objectUrl (String) -
    Deprecated single bucket folder or file URL. Use objectUrls for new integrations.

  • accessKey (String) -
    Storage access key. Use with secretKey and, for temporary credentials, token.

  • secretKey (String) -
    Storage secret key. Use with accessKey and, for temporary credentials, token.

  • token (String) -
    Temporary storage credential token when short-term credentials are used.

  • options (Map<String, Object>) -
    Additional import options passed to the service.

RETURNS:

String

A JSON response whose data.jobId identifies the created import job.

Example

Creates an import job for a project database in Zilliz Cloud.

java
CloudImportRequest request = CloudImportRequest.builder()
.projectId(PROJECT_ID)
.regionId(REGION_ID)
.collectionName("books")
.objectUrls(List.of(List.of("s3://bucket/books.parquet")))
.accessKey(ACCESS_KEY)
.secretKey(SECRET_KEY)
.apiKey(API_KEY)
.build();
String response = BulkImportUtils.bulkImport("https://api.cloud.zilliz.com", request);
Minimum SDK versionv2.5.x
Ctrl I