【问题标题】:Use external table redshift spectrum defined in glue data catalog使用胶水数据目录中定义的外部表红移光谱
【发布时间】:2018-06-19 06:28:00
【问题描述】:

我在 Glue 数据目录中定义了一个表,我可以使用 Athena 进行查询。由于表中有一些数据我想与其他 Redshift 表一起使用,我可以访问 Glue 数据目录中定义的表吗?

什么是创建外部表查询来引用 Glue 目录中的表定义?

【问题讨论】:

    标签: amazon-web-services amazon-redshift amazon-athena aws-glue amazon-redshift-spectrum


    【解决方案1】:

    来自 AWS (Creating External Schemas),

    create external schema athena_schema from data catalog 
    database 'sampledb' 
    iam_role 'arn:aws:iam::123456789012:role/MySpectrumRole' 
    region 'us-east-2';
    

    这会创建一个架构 athena_schema,它指向 Athena / Glue 中的 sampledb 数据库。

    您需要为您指定的 IAM 角色授予适当的访问权限:Redshift 集群需要能够代入该角色,并且该角色需要访问 Glue。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-14
      • 2014-07-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-02-18
      • 2018-09-26
      • 2020-02-01
      相关资源
      最近更新 更多