在Amazon Athena中设置多个位置

里旺

有什么方法可以在Amazon Athena中为表设置多个位置?例如,我想从目录“ s3:// location-1”,“ s3:// location-2”,“ s3:// location-3”等中读取数据。还是使用alter table添加它们?

谢谢

克里斯

您实际上可以为此使用分区。您唯一的限制是,雅典娜目前仅接受1个存储桶作为源。因此,以您的示例为例,为什么不创建一个名为“ locations”的存储桶,然后创建诸如location-1,location-2,location-3之类的子目录,然后在其上应用分区。

这样,您可以执行诸如select * from table where location ='location-1'的操作

参见http://docs.aws.amazon.com/athena/latest/ug/partitions.html

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章