Can I change a table from internal to external in hive?

George TeVelde picture George TeVelde · Aug 7, 2012 · Viewed 29.1k times · Source

I created a table in hive as a managed table, but it was supposed to be external, is it possible to change the table type of the table without losing the data?

Answer

George TeVelde picture George TeVelde · Aug 9, 2012
ALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE')

Note: EXTERNAL and TRUE need to caps or it will not work