简体   繁体   English

从 Athena 获取数据和胶水权限

[英]Fetching data from Athena and glue permissions

I am using the code listed here to query data using Athena https://gist.github.com/schledererj/b2e2a800998d61af2bbdd1cd50e08b76我正在使用此处列出的代码使用 Athena https://gist.github.com/schledererj/b2e2a800998d61af2bbdd1cd50e08b76查询数据

This needs the below policy to work -这需要以下政策才能起作用 -

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "BroadAccess",
      "Action": [
        "glue:GetTable",
        "glue:GetPartitions"
      ],
      "Effect": "Allow",
      "Resource": "*"
    }
  ]
}

Why is permission required for Glue resources for this to work?为什么 Glue 资源需要许可才能工作?

Athena uses the Glue catalog to store all the information about databases and tables. 雅典娜使用Glue目录存储有关数据库和表的所有信息。 Athena itself is just the execution engine. 雅典娜本身只是执行引擎。 When you run a query in Athena it starts by parsing the SQL, then asking Glue about the tables that are included in the query, what columns they have, and where their data is located. 当您在Athena中运行查询时,它首先解析SQL,然后询问Glue有关查询中包含的表,它们具有哪些列以及它们的数据位于何处。 It uses this information to validate the query (do all the columns mentioned in the query exist, for example), and then it uses the data location(s) to plan the execution of the query. 它使用此信息来验证查询(例如,是否存在查询中提到的所有列),然后使用数据位置来计划查询的执行。

You can read all about how Athena and Glue work together in the Integration with AWS Glue document. 您可以在与AWS Glue集成文档中阅读有关Athena和Glue如何协同工作的所有信息。

I would not suggest using BroadAccess operations as you want.我不建议您随意使用BroadAccess操作。 Take a look at this page " Fine-Grained Access to Databases and Tables in the AWS Glue Data Catalog " and find what are the permissions that your application need.查看此页面“ 对 AWS Glue 数据目录中的数据库和表进行精细访问”并找到您的应用程序需要的权限。 Then add on the "Action": [] array property of your configuration.然后添加"Action": []配置的数组属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 通过 Athena 创建 Glue 数据目录 SDK - Create Glue data catalog via Athena SDK 从 Athena 控制台访问胶水表 - access glue table from Athena console AWS Glue Crawler 在没有 Glue Job 的情况下将所有数据发送到 Glue Catalog 和 Athena - AWS Glue Crawler sends all data to Glue Catalog and Athena without Glue Job 如何创建 Athena 堆栈并使用 Glue Data 目录? - How to create an Athena stack and consume Glue Data catalog? AWS Athena 从从 S3 的 GLUE 爬虫输入 csv 创建的表中返回零记录 - AWS Athena Returning Zero Records from Tables Created from GLUE Crawler input csv from S3 AWS Athena 从 GLUE Crawler 输入的表中返回零记录来自 S3 - AWS Athena Return Zero Records from Tables Created by GLUE Crawler input csv from S3 将数据从胶水加载到雪花 - Loading data from glue to snowflake 胶水爬虫中排除的文件夹在 Athena 中抛出 HIVE_BAD_DATA 错误 - Excluded folder in glue crawler throws HIVE_BAD_DATA error in Athena 来自 Athena 的 Quicksight 数据以获得正确的时间戳 - Quicksight data from Athena for correct TimeStamp 亚马逊雅典娜可以在没有胶水目录的情况下工作吗? - Can amazon Athena work without Glue catalog?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM