mc table rename
The mc table rename command renames an Iceberg table on an AIStor cluster.
You can rename a table within the same namespace or move it to a different namespace using the --to-namespace flag.
Parameters
ALIAS
Required
The alias of an AIStor cluster.
NAMESPACE
Required
The name of the source namespace containing the table to rename.
NEW_TABLE
Required
The new name for the table.
OLD_TABLE
Required
The current name of the table.
WAREHOUSE
Required
The name of the warehouse containing the table.
--to-namespace
Optional
The destination namespace when moving a table to a different namespace. If not specified, the table is renamed within the same namespace.
Global flags
This command supports any of the global flags.
Examples
Rename a table within the same namespace
Use mc table rename to rename a table:
mc table rename ALIAS WAREHOUSE NAMESPACE OLD_TABLE NEW_TABLE
- Replace
ALIASwith the alias of the AIStor cluster. - Replace
WAREHOUSEwith the name of the warehouse. - Replace
NAMESPACEwith the name of the namespace. - Replace
OLD_TABLEwith the current table name. - Replace
NEW_TABLEwith the new table name.
Move a table to a different namespace
Use the --to-namespace flag to move the table to a different namespace:
mc table rename myaistor analytics dev old_table new_table --to-namespace prod
Rename with JSON output
Use the --json global flag to output the results in JSON format:
mc table rename myaistor analytics prod old_table new_table --json