Aws Athena-重命名列名 [英] Aws Athena - Rename column name
本文介绍了Aws Athena-重命名列名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试更改AWS Athena表中的列名.从 old_name
到 new_name
.
I am trying to change a column name in an AWS Athena table.
From old_name
to new_name
.
普通DDL命令不会影响表(无法执行).
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 ?
推荐答案
我错了,Athena使用 HIVE DDL
语法,因此正确的命令是: ALTER TABLE %% table-name %%更改%% old-column-name %% %% new-column-name %%< string> ;;
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>;
我的回答基于与问题相关的 hive
.
I based my answer on a hive
related question.
这篇关于Aws Athena-重命名列名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文