如何重命名 AWS Athena 输出 csv 中的列?
我想替换 Athena 查询输出中的列名称。我无法更改数据库中的名称。可以直接重命名吗?
case when kpi in ('Brand Searches') then replace('Total Searches','Brand Searches') end
这是输出:
KPI _col7
Brand Searches Total Searches
创建了一个新列,我只想重命名该列。有简单的出路吗?
谢谢。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以将该列别名为您选择的名称:
select count(*) as "number of counts" from ...
You can alias the column to the name of your choice:
select count(*) as "number of counts" from ...