

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# Spark と Glue で Delta Lake AWS クラスターを使用する
<a name="Deltacluster-spark-glue"></a>

Glue Catalog AWS を Delta Lake テーブルのメタストアとして使用するには、次の手順でクラスターを作成します。を使用して Delta Lake 分類を指定する方法については AWS Command Line Interface、[「クラスターの作成 AWS Command Line Interface 時に を使用して設定](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps-create-cluster.html#emr-configure-apps-create-cluster-cli)を指定する」または「クラスターの作成[時に Java SDK を使用して設定を指定する](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/emr-configure-apps-create-cluster.html#emr-configure-apps-create-cluster-sdk)」を参照してください。

**Delta Lake クラスターを作成する**

1. 次のコンテンツを含む `configurations.json` ファイルを作成します。

   ```
   [{"Classification":"delta-defaults",  
   "Properties":{"delta.enabled":"true"}},
   {"Classification":"spark-hive-site",
   "Properties":{"hive.metastore.client.factory.class":"com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory"}}]
   ```

1. 次のように設定してクラスターを作成し、**example Amazon S3 bucket path** と **subnet ID** を実際の値に置き換えます。

   ```
   aws emr create-cluster 
       --release-label  emr-6.9.0  
       --applications Name=Spark  
       --configurations file://delta_configurations.json 
       --region us-east-1  
       --name My_Spark_Delta_Cluster  
       --log-uri  s3://amzn-s3-demo-bucket/  
       --instance-type m5.xlarge  
       --instance-count 2   
       --service-role EMR_DefaultRole_V2  
       --ec2-attributes  InstanceProfile=EMR_EC2_DefaultRole,SubnetId=subnet-1234567890abcdef0
   ```