Altering table properties
You can change Impala's metadata relating to a given Kudu table by altering the table's properties. These properties include the table name, the list of Kudu master addresses, and whether the table is managed by Impala (internal) or externally. You cannot modify a table's split rows after table creation.
Rename an Impala mapping table:
ALTER TABLE my_table RENAME TO my_new_table;
Renaming a table using the
ALTER TABLE ...
RENAME statement only renames the Impala mapping table, regardless of whether the
table is an internal or external table. This avoids disruption to other applications that may
be accessing the underlying Kudu table.
Rename the underlying Kudu table for an internal table:
In CDH 5.14 and lower, if a table is an internal table, the underlying Kudu table may be
renamed by changing the
ALTER TABLE my_internal_table SET TBLPROPERTIES('kudu.table_name' = 'new_name')
Remapping an external table to a different Kudu table:
If another application has renamed a Kudu table under Impala, it is possible to re-map an external table to point to a different Kudu table name.
ALTER TABLE my_external_table_ SET TBLPROPERTIES('kudu.table_name' = 'some_other_kudu_table')
Change the Kudu master addresses:
ALTER TABLE my_table SET TBLPROPERTIES('kudu.master_addresses' = 'kudu-original-master.example.com:7051,kudu-new-master.example.com:7051');
Change an internally-managed table to external:
ALTER TABLE my_table SET TBLPROPERTIES('EXTERNAL' = 'TRUE');