mc table tag set
The mc table tag set command adds or updates tags on an Iceberg table.
Specify one or more KEY=VALUE pairs.
Setting a key that already exists overwrites its value.
The tag rules, such as the maximum number of tags and the allowed characters, are described in Tag-based access control.
The following command sets the env and owner tags on the mytable table in the mynamespace namespace of the mywarehouse warehouse on the myaistor MinIO AIStor cluster:
mc table tag set myaistor/mywarehouse/mynamespace/mytable env=prod owner=aliceThe command has the following syntax:
mc [GLOBALFLAGS] table tag set \
ALIAS/WAREHOUSE/NAMESPACE/TABLE \
KEY=VALUE [KEY=VALUE ...]- 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/WAREHOUSE/NAMESPACE/TABLE
Required
The path to the table on which to set tags, where:
ALIASis the alias of a MinIO AIStor cluster.WAREHOUSEis the name of the warehouse that contains the table.NAMESPACEis the namespace that contains the table. Specify a nested namespace with additional slash-separated parts, for exampleparent/child.TABLEis the name of the table.
KEY=VALUE
Required
One or more tags to set, each as a KEY=VALUE pair separated by spaces.
Setting a key that already exists overwrites its value.
A tag key must be between 1 and 128 characters, and a tag value can be between 0 and 256 characters.
Keys and values can contain letters, numbers, spaces, and the characters _ . : / = + @ -.
When a key or value contains spaces, quote the entire KEY=VALUE argument in your shell, for example owner="data team".
Tag keys cannot start with the reserved prefixes aws:, minio:, or aistor:.
A table can have at most 10 tags.
Global flags
This command supports any of the global flags.
Examples
Set tags on a table
mc table tag set myaistor/mywarehouse/mynamespace/mytable env=prod owner=aliceUpdate an existing tag
Set a key that already exists to overwrite its value:
mc table tag set myaistor/mywarehouse/mynamespace/mytable env=staging