Is it possible to change the metadata of a column that is on a partitioned table in Hive?

扶醉桌前 提交于 2019-12-02 03:11:48

You can easily change column type:

Use alter table in Hive, change type to STRING, etc:

alter table table_name change column col_name col_name string cascade; --change to string

See documentation.

ALTER TABLE CHANGE COLUMN with CASCADE command changes the columns of a table's metadata, and cascades the same change to all the partition metadata.

Alternatively you can recreate table like in this answer: https://stackoverflow.com/a/58299056/2700344

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!