Sai*_*tty 5 csv amazon-s3 amazon-web-services parquet amazon-athena
Currently, the Athena query results are in tsv format in S3. Is there any way to configure Athena queries to return results in Parquet format.
回答
目前,无法直接与Athena进行。要配置Athena查询的结果,您只能设置查询结果的位置和加密配置。
解决方法
1)从十月起,雅典娜支持CTAS查询,您可以尝试使用此功能。
https://docs.aws.amazon.com/athena/latest/ug/ctas.html
https://docs.aws.amazon.com/athena/latest/ug/ctas-examples.html
我认为示例4或5可能会让您感兴趣。
2)您可以创建Python脚本并使用Boto3框架。这是示例,您可以根据需要调整此脚本,并将保存查询结果添加到拼花地板格式中。
https://gist.github.com/schledererj/b2e2a800998d61af2bbdd1cd50e08b76
3)如果要转换数据,则应使用AWS EMR或AWS Glue之类的服务。