amazon-athena - 亚马逊雅典娜不使用胶水目录

标签 amazon-athena aws-glue

我使用 awsgluecrawler 创建了一个带有表的数据库。在 athena 中,我无法选择该数据库/表进行查询。我认为问题可能出在服务区域位置。接下来是我的设置:

  1. s3 csv 文件位于爱尔兰
  2. awsgluecrawler 在创建时没有任何指向其位置的选项,但可以通过下一个 url - https://console.aws.amazon.com/glue/home?region= 访问。 us-east-1 。所以我认为它是在 us-east-1 区域创建的,但我不确定。区域参数出现在我帐户的任何页面上。

另请参阅附件

enter image description here

enter image description here

最佳答案

您检查过这里吗:[ https://docs.aws.amazon.com/athena/latest/ug/glue-upgrade.html

您似乎需要执行一些 AWS Glue 升级,并添加策略,以便 Athena 可以提取目录信息。此外,常见问题解答可在此处查看 https://docs.aws.amazon.com/athena/latest/ug/glue-faq.html 。我还没有处理过这个场景,但正在处理 Glue - Redshift。

在FAQ中提到如下:

Why do I need to add AWS Glue policies to Athena users?
Before you upgrade, Athena manages the data catalog, so Athena actions must be allowed for your users to perform queries. After you upgrade to the AWS Glue Data Catalog, Athena actions no longer apply to accessing the AWS Glue Data Catalog, so AWS Glue actions must be allowed for your users. Remember, the managed policy for Athena has already been updated to allow the required AWS Glue actions, so no action is required if you use the managed policy.

What happens if I don’t allow AWS Glue policies for Athena users?

If you upgrade to the AWS Glue Data Catalog and don't update a user's customer-managed or inline IAM policies, Athena queries fail because the user won't be allowed to perform actions in AWS Glue. For the specific actions to allow, see Step 2 - Update Customer-Managed/Inline Policies Associated with Athena Users.

关于amazon-athena - 亚马逊雅典娜不使用胶水目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49082086/

相关文章:

scala - 将 Spark fileoutputcommitter.algorithm.version=2 与 AWS Glue 结合使用

pyspark - 为什么在胶水 pyspark ETL 作业中无法添加到 Parquet 表中的新列?

amazon-web-services - 在 Sagemaker 笔记本中将 python 包安装到 PySpark 内核

amazon-s3 - 按 S3 创建日期分区 Athena 查询

python - 如何使用 Boto3 get_query_results 方法从 AWS Athena 创建 Dataframe

amazon-web-services - 通过 API 从 Athena Query 返回 JSON

sql - Athena/SQL 查询以获得所需结果

python - 对 AWS Athena 查询结果进行分页时如何跳过 header

amazon-web-services - AWS Glue ETL 作业失败,出现 AnalysisException : u'Unable to infer schema for Parquet. 必须手动指定。;'

presto - 从 AWS Athena/Presto 查询结构字段