How To: Convert External table to Internal table or vice-versa

Description:

According to Qubole, the External Tables and Internal Tables (non-External) differ only in the aspect that dropping the table drops meta-data in External tables, whereas it drops both meta-data and data in the case of Internal tables. 

How To:

Use the following command to convert an external table to an internal table:

    use <db name>;
    ALTER TABLE <tablename> SET TBLPROPERTIES('EXTERNAL'='FALSE');

Use the following command to convert an internal table to an external table:

    use <db name>;
ALTER TABLE <tablename> SET TBLPROPERTIES('EXTERNAL'='TRUE');

 

Have more questions? Submit a request

Comments

Powered by Zendesk