Reputation: 664
I have lot of tables in my database, some of them are External_Tables, every time when I drop my External_Table, I need to find the location of the External_Table and I need to -rm -r the data.So,Is there any way in hive, to drop External_Table with both Metadata and Data at once like, if we drop the managed_table both data and metadata will be dropped.
Upvotes: 0
Views: 125
Reputation: 44951
Turn the external table to a managed table before dropping it
alter table mytable set tblproperties ('EXTERNAL'='FALSE');
Upvotes: 1