Convert a managed table to external

You can easily convert a managed table if it is not an ACID (transactional) table to external using the ALTER TABLE statement. You might have a non-ACID, managed table after an upgrade from Hive 1 or 2.

The following pseudo-code changes a table to external. The data and metadata is dropped when the table is dropped.

ALTER TABLE ... SET TBLPROPERTIES('EXTERNAL'='TRUE','external.table.purge'='true')