可以从AWS Athena下载CSV数据以可用格式
我在S3存储桶中有70,000多个CSV文件。他们都有相同的标题。我想将文件组合到一个CSV中,我想将其下载到我的计算机上。
使用AWS雅典娜,我似乎是大部分时间。我已经从S3存储桶中创建了一个数据库。然后,我可以像这样运行查询:
select * from my_table_name limit 100
查看查询的结果(在我的情况下是将来自S3的许多CSV组合在一起)。
但是,当我转到该查询的“下载结果”时,我无法在Excel(或文本编辑器)中打开CSV。
做
file -b my_table_name.csv
返回数据
。
我很困惑,因为我可以从视觉上查看雅典娜查询的结果,但不能以可用的文件格式下载它们。我是否错过了如何下载此数据的明显内容?为什么不给我正常(也许是UTF-8)CSV?
I've got 70,000+ CSV files in an S3 bucket. They all have the same headers. I would like to combine the files into one CSV, which I want to download onto my machine.
Using AWS Athena, I seem to be most of the way there. I have created a database from the S3 bucket. I can then run queries like this:
select * from my_table_name limit 100
And see the results of the query (which in my case is combining many CSVs from S3) in the Athena console.
However when I go to "Download results" of that query, I can't open the CSV in Excel (or a text editor).
Doing
file -b my_table_name.csv
returns data
.
I'm confused because I can visually see the results of my Athena query but can't download them in a usable file format. Am I missing something obvious for how to download this data? Why isn't it giving me a normal (perhaps UTF-8) CSV?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在雅典娜的设置中,我进行了加密。解决了。
In Athena settings, I had encryption on. That solved it.