Search code examples
typeshiveexternal

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


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?


Solution

  • ALTER TABLE <table> SET TBLPROPERTIES('EXTERNAL'='TRUE')
    

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