is it possible to create a single table from same schema data but folders are present in different region S3 buckets?

0

Example s3://bucket1/mytable/ -- > east-2 bucket folder with same schema s3://bucket2/mytable/ -- > west-2 bucket folder with same schema

can we create a single table from this two buckets in Athena using crawlers or any other way in Glue?

3 個答案
1

This blog outlines examples of access for same or different account across region: https://aws.amazon.com/blogs/big-data/configure-cross-region-table-access-with-the-aws-glue-catalog-and-aws-lake-formation/, hope it helps.

If not interested in lake formation, a good starting point can be this: https://docs.aws.amazon.com/athena/latest/ug/querying-across-regions.html

profile picture
專家
已回答 1 個月前
profile picture
專家
已審閱 1 個月前
  • Hi Antonio, what i meant is I wanted to know is there a way to map 2 folders in different buckets to same table in Athena from same account but regions are different ? I tried to run crawler with both locations in the data source location but it creates two separate tables for both locations.

    Does Athena/ Glue/ Crawlers support this feature ?

0

Direct creation of a single table spanning multiple regions is not supported through Glue Crawlers alone; combine Glue cataloging with Athena views or use Lake Formation. Here are steps and considerations for setting up a single Athena table that combines data from different S3 buckets across regions:

  • Use S3 Cross-Region Replication or AWS DataSync to centralize data into one bucket for simplicity, with additional costs for data transfer and storage.
  • Catalog tables in each region using AWS Glue Crawlers.
  • In Athena, create a unified view that unions tables from different regions. This requires setting up cross-region S3 access and may incur additional costs.
  • Ensure IAM and S3 bucket policies allow for cross-region access.
  • Consider AWS Lake Formation for advanced data lake management, including cross-region data access.
profile picture
專家
已回答 1 個月前
0

Technically you can since each partition can have a custom location that doesn't necessarily have to be under the table location or bucket, so you would need to add the partitions yourself (or some script) specifying the bucket location url). Having said that, it's probably a bad idea since it's not something you normally do and can run into issues.

profile pictureAWS
專家
已回答 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南