Managed to external table

In Hive1/2, a managed table can be converted to an external table by setting the external property of the table as true. In Hive3 this is restricted.

Hive 1 and 2

ALTER TABLE table_name SET TBLPROPERTIES('EXTERNAL'='true') can be performed on managed tables to convert external tables.

For example:
ALTER TABLE test_groupby_3 SET TBLPROPERTIES('EXTERNAL'='true')
ERROR : Failed
org.apache.hadoop.hive.ql.metadata.HiveException: Unable to alter table. default.test_groupby_3 cannot be converted to external table as it is transactional table.

Hive 3

ALTER TABLE table_name SET TBLPROPERTIES('EXTERNAL'='true') cannot be performed on managed tables to convert external tables.

Action Required

Remove a table property that sets EXTERNAL=true for a managed table.

Distribution Affected

CDH5, CDH6, HDP2