问题
Athena table "organization" reads data from parquet files in s3. I need to change a column name from "cost" to "fee" . The data files goes back to Jan 2018. If I just rename the column in Athena , table won't be able to find data for new column in parquet file. Please let me know if there ways to resolve it.
回答1:
You have to change the schema and point to new column "fee"
But it depends on ur situation.
If you have two data sets, in one dataset it is called "cost" and in another dataset it is called "fee". If this is the case then it is quite difficult and needs more thinking.
If the parquet files calls it "cost" but in athena you want query it by "fee". In this case add a new column called fee. Change the schema from cost -> cost to cost -> fee
来源:https://stackoverflow.com/questions/55029107/rename-column-in-athena