ALTER ICEBERG TABLE
Last updated
Last updated
Alters previously configured options for the specified Apache Iceberg table:
Users can change the partition or cluster columns of an existing table. Additionally, you can switch from partitioning to clustering and vice versa, with these changes applying to data moving forward.
Changing columns
Changes the partition/cluster columns of an existing table. This change does not rebuild the existing data according to the new partitioning, but will apply the new partitioning to data moving forward.
Partitioned table example:
Clustered table example:
Note you can use any supported by iceberg. for example:
Stop partitioning\clustering
To stop table partitioning or clustering moving forward:
You can also change the table structure from clustering to partitioning and vice versa, which will apply to data moving forward.
Changes the sorting columns of an existing table.
This will affect the data written from now onwards and new compactions will write data using the new sorting.
To disable sorting completely:
Modifying table options:
Changing partitions columns:
Changing Sort columns:
Note
that not all table options are mutable.
All mutable options are denoted by — editable in the individual option descriptions.
If you wishes to re-sort old data after changing the sorting, you can trigger a compaction with command.
To check if a certain table option is mutable, see .