[英]Use external table redshift spectrum defined in glue data catalog
I have a table defined in Glue data catalog that I can query using Athena. 我在Glue数据目录中定义了一个表,可以使用Athena进行查询。 As there is some data in the table that I want to use with other Redshift tables, can I access the table defined in Glue data catalog? 由于该表中有一些数据要与其他Redshift表一起使用,因此我可以访问Glue数据目录中定义的表吗?
What will be the create external table query to reference the table definition in Glue catalog? 创建外部表查询以引用Glue目录中的表定义是什么?
From AWS ( Creating External Schemas ), 在AWS( 创建外部架构 )中,
create external schema athena_schema from data catalog
database 'sampledb'
iam_role 'arn:aws:iam::123456789012:role/MySpectrumRole'
region 'us-east-2';
This creates a schema athena_schema
that points to the sampledb
database in Athena / Glue. 这将创建一个架构athena_schema
,该架构指向Athena / Glue中的sampledb
数据库。
You need to grant appropriate access to the IAM role you specify: the Redshift cluster needs to be able to assume the role, and the role needs access to Glue. 您需要授予对指定的IAM角色的适当访问权限:Redshift集群需要能够承担该角色,而该角色需要对Glue的访问权限。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.