Changing the Hive table type using the DDL statement does not work

Viewed 21

Changing the Hive table type using the DDL statement does not work,for expleon

hive> alter table ads.ods_ads_copy set tblproperties('EXTERNAL'='FALSE'); OK Time taken: 1.736 seconds hive> desc formatted ads.ods_ads_copy; enter image description here

1 Answers

You can change properties like this but the actual data/folder location will not change and can cause confusion. Hive will show you whatever DDL you will apply and it wont change table properties from external to internal. Clean and better way is to recreate table like below.

create table mymanagedtable as select * from mytable;
drop table mytable;
Related