🚀 Try Zilliz Cloud, the fully managed Milvus, for free—experience 10x faster performance! Try Now>>

milvus-logo
LFAI
< Docs
  • Python

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 createStringTrue
descriptionDescription of the partition to createStringFalse

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")

Try Managed Milvus for Free

Zilliz Cloud is hassle-free, powered by Milvus and 10x faster.

Get Started
Feedback

Was this page helpful?