pyflink.table.catalog.Catalog.create_partition#
- Catalog.create_partition(table_path: ObjectPath, partition_spec: CatalogPartitionSpec, partition: CatalogPartition, ignore_if_exists: bool)[source]#
Create a partition.
- Parameters
table_path – Path
ObjectPathof the table.partition_spec – Partition spec
CatalogPartitionSpecof the partition.partition – The partition
CatalogPartitionto add.ignore_if_exists – Flag to specify behavior if a table with the given name already exists: if set to false, it throws a TableAlreadyExistException, if set to true, nothing happens.
- Raise
CatalogException in case of any runtime exception. TableNotExistException thrown if the target table does not exist. TableNotPartitionedException thrown if the target table is not partitioned. PartitionSpecInvalidException thrown if the given partition spec is invalid. PartitionAlreadyExistsException thrown if the target partition already exists.