'How to rename a column in AWS Athena output csv?
I want to replace a column name in output of Athena query. I can not change the name in the database. Is it possible to rename it directly?
case when kpi in ('Brand Searches') then replace('Total Searches','Brand Searches') end
Here is the output:
KPI _col7
Brand Searches Total Searches
A new column was created, I want only to rename the column. Is there an easy way out?
Thank you.
Solution 1:[1]
You can alias the column to the name of your choice:
select count(*) as "number of counts" from ...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nicolas Busca |
