Renaming column name in Athena

0 votes
Normal DDL commands does not affect the table (They cannot be executed). I am trying to change a column name in an AWS Athena table old_name to new_name. Is It possible to change a column name without deleting and re-creating the table from scratch?

Can someone help?
Jan 16 in AWS by Anjali
• 2,930 points
416 views

1 answer to this question.

0 votes

You can use :-

ALTER TABLE %%table-name%% CHANGE %%old-column-name%% %%new-column-name%%<string>;

You can find more about supported and unsupported DDLs here.

Hope this helps

answered Jan 16 by julie

Related Questions In AWS

+3 votes
5 answers

Renaming files in S3

You can either use AWS CLI or ...READ MORE

answered Oct 16, 2018 in AWS by petter dj
1,143 views
0 votes
2 answers

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

Thanks for the answer. This should be clear ...READ MORE

answered Aug 14 in AWS by athenauserz
1,437 views
0 votes
1 answer

Pivot rows into columns in AWS Athena?

You can use the following method :- It ...READ MORE

answered Oct 29, 2018 in AWS by Priyaj
• 56,900 points
1,023 views
0 votes
1 answer

How to convert String to Date in Amazon Athena?

You can use date_parse. All you need ...READ MORE

answered Jan 16 in AWS by chandan
1,905 views
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer

How to Use hypen as key name in dynamo db mapper

It seems you cannot have a column ...READ MORE

answered Aug 22, 2018 in AWS by Priyaj
• 56,900 points
170 views
0 votes
1 answer

Is it possible to create view in Athena?

AWS Athena does not support creating any ...READ MORE

answered Jan 16 in AWS by Zullu
50 views