[ 
https://issues.apache.org/jira/browse/HIVE-27177?focusedWorklogId=856083&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-856083
 ]

ASF GitHub Bot logged work on HIVE-27177:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Apr/23 11:20
            Start Date: 11/Apr/23 11:20
    Worklog Time Spent: 10m 
      Work Description: deniskuzZ commented on code in PR #4155:
URL: https://github.com/apache/hive/pull/4155#discussion_r1162667175


##########
iceberg/iceberg-handler/src/test/queries/negative/alter_acid_table_to_iceberg_failure.q:
##########
@@ -3,4 +3,4 @@ set 
hive.txn.manager=org.apache.hadoop.hive.ql.lockmgr.DbTxnManager;
 
 drop table tbl_orc;
 create table tbl_orc (a int, b string) stored as orc 
tblproperties('transactional'='true');
-alter table tbl_orc set tblproperties 
('storage_handler'='org.apache.iceberg.mr.hive.HiveIcebergStorageHandler');
\ No newline at end of file
+alter table tbl_orc convert to iceberg;

Review Comment:
   Could we please cover all of the aspects mentioned below:
   
   ````
   To migrate a Hdfs Hive format table to an Iceberg table use the command:
   
   ALTER TABLE [dbname.]table_name CONVERT TO ICEBERG [TBLPROPERTIES(...)];
   
   For example
        - ALTER TABLE hive_table CONVERT TO ICEBERG;
        - ALTER TABLE hive_table CONVERT TO ICEBERG TBLPROPERTIES(
          'iceberg.catalog' = 'hadoop.catalog');
        - ALTER TABLE hive_table CONVERT TO ICEBERG TBLPROPERTIES(
          'metadata.generator.threads' = '10');
   
   The input table must meet these requirements:
        - table is an external table
        - table is not a transactional table
        - InputFormat must be either PARQUET, ORC, or AVRO
   
   The data files of the table are not affected by this operation.
   
   When you migrate a Hive table <table_name> to Iceberg, a backup of the 
table, named <table_name>backup, is created.
   ````





Issue Time Tracking
-------------------

    Worklog Id:     (was: 856083)
    Time Spent: 2h 40m  (was: 2.5h)

> Add alter table...Convert to Iceberg command
> --------------------------------------------
>
>                 Key: HIVE-27177
>                 URL: https://issues.apache.org/jira/browse/HIVE-27177
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Add an alter table <tblName> convert to Iceberg [TBLPROPERTIES('','')] to 
> convert exiting external tables to iceberg tables



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to