milvus-logo

create_partition()

This method creates a partition with the specified name.

Invocation

create_partition(partition_name, description="")

Parameters

ParameterDescriptionTypeRequired
partition_nameName of the partition to create.StringTrue
descriptionDescription of the partition to create.StringFalse

Return

The newly created partition object.

Raises

  • CollectionNotExistException: error if the collection does not exist.
  • BaseException: error if the specified partition does not exist.

Example

from pymilvus import Collection
collection = Collection("book")      # Get an existing collection.
collection.create_partition("novel")