有没有办法在亚马逊雅典娜中为一张桌子设置多个位置?例如,我想从目录's3://location-1‘、's3://location-2’、's3://location-3‘等中读取数据,或者使用alter table?
谢谢
发布于 2017-08-14 15:14:48
为此,您可以实际使用分区。你唯一的限制是雅典娜现在只接受一个存储桶作为源。因此,使用您的示例,为什么不创建一个名为"locations“的存储桶,然后创建子目录,如location-1、location-2、location-3,然后在其上应用分区。
这样你就可以像select * from table where location = 'location-1‘那样做
请参阅http://docs.aws.amazon.com/athena/latest/ug/partitions.html
https://stackoverflow.com/questions/45447066
复制相似问题