Switch a hive table between managed table and external table - ayushmathur94/Spark GitHub Wiki

Make your table MANAGED first:

hive> ALTER TABLE abc SET TBLPROPERTIES('EXTERNAL'='FALSE'); Then truncate

hive> truncate table abc;

And finally you can make it external again:

hive> ALTER TABLE abc SET TBLPROPERTIES('EXTERNAL'='TRUE');

hive> Describe FORMATTED table_name;