AWS Glue Data Catalog¶
既存の AWS Glue Data Catalog に含まれるテーブル定義に Denodo 組み込み MPP からアクセスする場合、AWS Glue Data Catalog を外部メタストアとして使用できます。
このために推奨する方法は values.yaml
の presto.catalog
プロパティを使用する方法です。このセクションでは、 glue-hive
、 glue-iceberg
、および glue-delta
の例をいくつか確認できます。
# -- Additional catalogs, as an example the jmx catalog provides JMX information from all nodes in the cluster.
catalog:
#jmx: |-
# connector.name=jmx
#
#glue-hive: |-
# connector.name=hive-hadoop2
# hive.metastore=glue
# hive.metastore.glue.region=
# hive.metastore.glue.catalogid=
# hive.metastore.glue.aws-access-key=
# hive.metastore.glue.aws-secret-key=
# hive.config.resources=core-site.xml
# hive.parquet.use-column-names=true
#
#glue-iceberg: |-
# connector.name=iceberg
# iceberg.catalog.type=HIVE
# hive.metastore=glue
# hive.metastore.glue.region=
# hive.metastore.glue.catalogid=
# hive.metastore.glue.aws-access-key=
# hive.metastore.glue.aws-secret-key=
# hive.config.resources=core-site.xml
# hive.parquet.use-column-names=true
#
#glue-delta: |-
# connector.name=delta
# hive.metastore=glue
# hive.metastore.glue.region=
# hive.metastore.glue.catalogid=
# hive.metastore.glue.aws-access-key=
# hive.metastore.glue.aws-secret-key=
# hive.config.resources=core-site.xml
# hive.parquet.use-column-names=true
新しいカタログを定義することもできます。具体的には、 presto/conf/catalog/
に presto/conf/catalog/glue_hive.properties
などのプロパティファイルを作成します。ファイル名の glue_hive
がカタログ名になります。
注: AWS Glue Data Catalog に接続するために推奨する方法は、AWS 資格情報を提供しない方法です。EKS Pod Identity、サービスアカウントの IAM ロール、または IAM EC2 インスタンスプロファイルを使用します。
これら 3 つのオプションのいずれも適用できない場合は、AWS 資格情報を使用できます。この場合、AWS 資格情報をアクセスキーとシークレットキーまたは IAM ロールの形式で 組み込み MPPのカタログ に指定する必要があります。
組み込み MPP の構成では、Glue と S3 の両方の資格情報プロパティを指定する必要があります (ただし、両方で同じものを使用できます)。MPP は S3 ファイルにアクセスする必要があるため、S3 資格情報が必要です。
アクセスキーとシークレットキー
hive.metastore.glue.aws-access-key
およびhive.metastore.glue.aws-secret-key
hive.s3.aws-access-key
およびhive.s3.aws-secret-key
IAM ロール:
hive.metastore.glue.iam-role
hive.s3.iam-role
Hive テーブル¶
connector.name=hive-hadoop2
hive.metastore=glue
# AWS region of the Glue Catalog
hive.metastore.glue.region=
# The ID of the Glue Catalog in which the metadata database resides
hive.metastore.glue.catalogid=
# Access Key and Secret Key for Glue
# Credentials and core-site.xml are not required when the MPP
# runs in EKS because it will use the EKS Pod Identities,
# IAM Roles for Service Accounts or the IAM EC2 instance profile,
# whichever is configured in EKS
hive.metastore.glue.aws-access-key=
hive.metastore.glue.aws-secret-key=
hive.config.resources=/opt/presto-server/etc/catalog/core-site.xml
# For Bulk Data load
hive.allow-drop-table=true
hive.non-managed-table-writes-enabled=true
hive.parquet.use-column-names=true
Delta Lake テーブル¶
connector.name=delta
hive.metastore=glue
# AWS region of the Glue Catalog
hive.metastore.glue.region=
# The ID of the Glue Catalog in which the metadata database resides
hive.metastore.glue.catalogid=
# Access Key and Secret Key for Glue
# Credentials and core-site.xml are not required when the MPP
# runs in EKS because it will use the EKS Pod Identities,
# IAM Roles for Service Accounts or the IAM EC2 instance profile,
# whichever is configured in EKS
hive.metastore.glue.aws-access-key=
hive.metastore.glue.aws-secret-key=
hive.config.resources=/opt/presto-server/etc/catalog/core-site.xml
#
hive.parquet.use-column-names=true
Iceberg テーブル¶
connector.name=iceberg
iceberg.catalog.type=HIVE
hive.metastore=glue
# AWS region of the Glue Catalog
hive.metastore.glue.region=
# The ID of the Glue Catalog in which the metadata database resides
hive.metastore.glue.catalogid=
# Access Key and Secret Key for Glue
# Credentials and core-site.xml are not required when the MPP
# runs in EKS because it will use the EKS Pod Identities,
# IAM Roles for Service Accounts or the IAM EC2 instance profile,
# whichever is configured in EKS
hive.metastore.glue.aws-access-key=
hive.metastore.glue.aws-secret-key=
hive.config.resources=/opt/presto-server/etc/catalog/core-site.xml
#
hive.parquet.use-column-names=true
AWS Glue Data Catalog にアクセスするための AWS の権限¶
Denodo 組み込み MPP の IAM ロールが AWS Glue Data Catalog にアクセスするために必要な AWS の権限を以下に示します。
AWS Glue からの読み込み:
glue:GetDatabases
glue:GetDatabase
glue:GetTables
glue:GetTable
glue:GetPartitions
glue:GetPartition
glue:BatchGetPartition
AWS Glue への書き込み(読み込みと同じ権限に加えて以下の権限が必要):
glue:CreateTable
glue:DeleteTable
glue:UpdateTable
glue:BatchCreatePartition
glue:UpdatePartition
glue:DeletePartition