Migrate Hive table to Iceberg feature

CDP supports Hive table migration from Hive to Iceberg tables using ALTER TABLE to set the table properties.

The topic "Test driving Iceberg from Impala" shows how to create Iceberg tables from Impala tables.

In-place table migration process

In-place table migration saves time generating Iceberg tables. There is no need to regenerate data files. Only metadata, which points to source data files, is regenerated.

To convert a Hive table to an Iceberg V1 table, use the following syntax:

ALTER TABLE table_name CONVERT TO ICEBERG;

To convert a Hive table to an Iceberg V2 table, you must run two queries. Use the following syntax:

ALTER TABLE table_name CONVERT TO ICEBERG
    
ALTER TABLE table_name SET TBLPROPERTIES ('format-version' = '2'
    ...)

In-place table migration saves time generating Iceberg tables. There is no need to regenerate data files. Only metadata, which points to source data files, is regenerated.