如何重命名 AWS Athena 输出 csv 中的列?
How to rename a column in AWS Athena output csv?
我想替换 Athena 查询输出中的列名。我无法更改数据库中的名称。可以直接重命名吗?
case when kpi in ('Brand Searches') then replace('Total Searches','Brand Searches') end
这是输出:
KPI _col7
Brand Searches Total Searches
创建了一个新列,我只想重命名该列。有没有捷径?
谢谢。
您可以将列作为您选择的名称的别名:
select count(*) as "number of counts" from ...
我想替换 Athena 查询输出中的列名。我无法更改数据库中的名称。可以直接重命名吗?
case when kpi in ('Brand Searches') then replace('Total Searches','Brand Searches') end
这是输出:
KPI _col7
Brand Searches Total Searches
创建了一个新列,我只想重命名该列。有没有捷径?
谢谢。
您可以将列作为您选择的名称的别名:
select count(*) as "number of counts" from ...