mc table remove

The mc table remove command deletes an Iceberg table on a MinIO AIStor cluster.

By default, this command removes only the table metadata from the Iceberg catalog. Use the --purge flag to also delete the underlying table data.

The following command removes the sales_data table from the prod namespace in the analytics warehouse on the myaistor MinIO AIStor cluster:

mc table remove myaistor analytics prod sales_data

The command has the following syntax:

mc [GLOBALFLAGS] table remove                 \
                 ALIAS                        \
                 WAREHOUSE                    \
                 NAMESPACE                    \
                 TABLE                        \
                 [--purge]
  • Brackets [] indicate optional parameters.
  • Parameters sharing a line are mutually dependent.
  • Parameters separated using the pipe | operator are mutually exclusive.

Copy the example to a text editor and modify as-needed before running the command in the terminal/shell.

Parameters

ALIAS

Required

The alias of a MinIO AIStor cluster.

NAMESPACE

Required

The name of the namespace containing the table.

TABLE

Required

The name of the table to delete.

WAREHOUSE

Required

The name of the warehouse containing the table.

--purge

Optional

Purge the table data along with the metadata. Without this flag, only the table metadata is removed from the catalog.

Using --purge permanently deletes all data associated with the table. This operation cannot be undone.

Global flags

This command supports any of the global flags.

Examples

Delete a table (metadata only)

Use mc table remove to delete a table’s metadata while preserving the data:

mc table remove ALIAS WAREHOUSE NAMESPACE TABLE
  • Replace ALIAS with the alias of the MinIO AIStor cluster.
  • Replace WAREHOUSE with the name of the warehouse.
  • Replace NAMESPACE with the name of the namespace.
  • Replace TABLE with the name of the table to delete.

Delete a table and purge all data

Use the --purge flag to delete the table and all its data:

mc table remove myaistor analytics prod sales_data --purge

On this page