Aws Athena - Rename column name

纵然是瞬间 提交于 2021-01-28 04:20:37

问题


I am trying to change a column name in an AWS Athena table. From old_name to new_name.

Normal DDL commands does not affect the table (They cannot be executed).

Is It possible to change a column name without deleting and re-creating the table from scratch ?


回答1:


I was mistaken, Athena uses HIVE DDL syntax so the correct command is : ALTER TABLE %%table-name%% CHANGE %%old-column-name%% %%new-column-name%%<string>;

I based my answer on a hive related question.




回答2:


You can find more about supported and unsupported DDLs here



来源:https://stackoverflow.com/questions/47418607/aws-athena-rename-column-name

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