Alter table feature

In Impala, you can use ALTER TABLE to set table properties. From Impala, you can use ALTER TABLE to rename a table, to change the table owner, or to change the role of the table owner.

You can convert an Iceberg v1 table to v2 by setting a table property as follows:'format-version' = '2'.

Impala syntax

ALTER TABLE table_name SET TBLPROPERTIES table_properties;
  • table_properties
    A list of properties and values using the following syntax:
    ('key' = 'value', 'key' = 'value', ... )
ALTER TABLE table_name RENAME TO new_table_name;

ALTER TABLE table_name SET OWNER USER user_name;

ALTER TABLE table_name SET OWNER ROLE role_name;

Impala examples

ALTER TABLE t1 RENAME TO t2;

ALTER TABLE ice_table1 set OWNER USER john_doe;

ALTER TABLE ice_table2 set OWNER ROLE some_role;

ALTER TABLE ice_8 SET TBLPROPERTIES ('read.split.target-size'='268435456');

ALTER TABLE ice_table3 SET TBLPROPERTIES('format-version' = '2');