mc table warehouse create

The mc table warehouse create command creates a new Iceberg warehouse on an AIStor cluster.

A warehouse is the top-level organizational unit in the Iceberg catalog hierarchy. Creating a warehouse also creates a corresponding bucket to store Iceberg table data and metadata.

Parameters

ALIAS

Required

The alias of an AIStor cluster on which to create the warehouse.

WAREHOUSE_NAME

Required

The name of the warehouse to create. This name is also used for the underlying bucket that stores the Iceberg data.

--ignore-existing

Alias: -p

Optional

Do not return an error if a warehouse with the specified name already exists.

--upgrade-existing

Optional

Upgrade an existing bucket to a warehouse. Use this flag when you have an existing bucket that you want to enable as an Iceberg warehouse.

Global flags

This command supports any of the global flags.

Examples

Create a new warehouse

Use mc table warehouse create to create a new warehouse:

mc table warehouse create ALIAS WAREHOUSE_NAME
  • Replace ALIAS with the alias of the AIStor cluster.
  • Replace WAREHOUSE_NAME with the name for the new warehouse.

Create a warehouse if it does not exist

Use the --ignore-existing flag to avoid errors if the warehouse already exists:

mc table warehouse create --ignore-existing myaistor analytics

Upgrade an existing bucket to a warehouse

Use the --upgrade-existing flag to convert an existing bucket into a warehouse:

mc table warehouse create --upgrade-existing myaistor mybucket