mc table maintenance set
The mc table maintenance set command configures a table-level maintenance override.
Syntax
The command has the following syntax:
mc table maintenance set [FLAGS] ALIAS/WAREHOUSE/NAMESPACE/TABLE
Flags
| Flag | Description |
|---|---|
--type value |
Maintenance type (icebergSnapshotManagement, icebergUnreferencedFileRemoval, icebergCompaction) (required). |
--max-age-hours value |
Maximum snapshot age in hours before expiration (required for icebergSnapshotManagement). |
--min-snapshots value |
Minimum number of snapshots to keep (required for icebergSnapshotManagement). |
--target-file-size-mb value |
Target file size in MB for compacted files (optional for icebergCompaction). |
--unreferenced-days value |
Days a file must be unreferenced before being marked noncurrent (required for icebergUnreferencedFileRemoval). |
--noncurrent-days value |
Days a noncurrent file is retained before permanent deletion (optional for icebergUnreferencedFileRemoval; inherits the warehouse-wide value if unset). |
--interval value |
How often this maintenance type runs, in minutes (optional; inherits the warehouse default if unset). |
Global flags
This command supports any of the global flags.
Examples
Enable snapshot management on one table, overriding the warehouse default.
mc table maintenance set myminio/my-warehouse/my-namespace/my-table --type icebergSnapshotManagement --max-age-hours 24 --min-snapshots 1
Enable unreferenced file removal on one table, overriding the warehouse default.
mc table maintenance set myminio/my-warehouse/my-namespace/my-table --type icebergUnreferencedFileRemoval --unreferenced-days 7
Enable unreferenced file removal on one table with its own noncurrent-days, independent of the warehouse-wide value.
mc table maintenance set myminio/my-warehouse/my-namespace/my-table --type icebergUnreferencedFileRemoval --unreferenced-days 7 --noncurrent-days 3
Enable compaction on a table with a custom target file size.
mc table maintenance set myminio/my-warehouse/my-namespace/my-table --type icebergCompaction --target-file-size-mb 64
Enable compaction on a table with a custom run interval (every 5 minutes).
mc table maintenance set myminio/my-warehouse/my-namespace/my-table --type icebergCompaction --interval 5
Behavior
S3 compatibility
The mc command-line tool is built for compatibility with the AWS S3 API and is tested with MinIO AIStor and AWS S3 for expected functionality and behavior.