How to set Multiple locations in Athena?

0 votes
Is there any way to set multiple location for a table in Amazon Athena?

For instance I want to read data from directory 's3://location-1', 's3://location-2', 's3://location-3' etc. Or is there a way to add them using alter table?

Thanks in advance.
Jan 16 in AWS by Anjali
• 2,910 points
58 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Unfortunately you can use athena with just one location. 

To suffice your query you can actually use partitions for this. Your only limitation is that athena right now only accepts 1 bucket as the source. 

So using your example, why not create a bucket called "locations", then create sub directories like location-1, location-2, location-3 then apply partitions on it.

That way you can do something like select * from table where location = 'location-1'

See this documentation for more information on Partitions http://docs.aws.amazon.com/athena/latest/ug/partitions.html

Hope this helps.

answered Jan 16 by william

Related Questions In AWS

0 votes
1 answer

How to delete / drop multiple tables in AWS athena?

It is not possible to run multiple ...READ MORE

answered Jan 17 in AWS by Edureka
• 4,180 points
198 views
0 votes
1 answer
+1 vote
1 answer

How to combine multiple S3 objects in the target S3 object w/o leaving S3

"However sometimes our raw objects are not ...READ MORE

answered Aug 28, 2018 in AWS by Priyaj
• 56,120 points
993 views
0 votes
1 answer

How to skip headers when reading a CSV file in S3 and creating a table in AWS Athena?

This is a known deficiency. The best ...READ MORE

answered Sep 4, 2018 in AWS by Archana
• 3,770 points
486 views
0 votes
1 answer
+1 vote
2 answers
0 votes
1 answer

How to provide tags for the stack in CloudFormation Template?

In the template anatomy, you cant set ...READ MORE

answered Aug 13, 2018 in AWS by bug_seeker
• 14,970 points
2,123 views
0 votes
1 answer

In Amazon Data Pipeline, how to make sure only once instance of a pipeline is running at any time?

On the CopyTablesActivity, you could set a lateAfterTimeout attribute ...READ MORE

answered Sep 19, 2018 in AWS by Priyaj
• 56,120 points
136 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.