

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Menggunakan Apache Iceberg dengan Amazon EMR di EKS
<a name="tutorial-iceberg"></a>

JAR runtime untuk Iceberg berisi kelas Iceberg yang diperlukan untuk dukungan runtime Spark. Prosedur berikut menunjukkan cara memulai pekerjaan dengan menggunakan runtime Iceberg spark.

**Untuk menggunakan Apache Iceberg dengan Amazon EMR pada aplikasi EKS**

1. Saat Anda memulai pekerjaan untuk mengirimkan pekerjaan Spark dalam konfigurasi aplikasi, sertakan file JAR runtime Iceberg spark:

   ```
   --job-driver '{"sparkSubmitJobDriver" : {"sparkSubmitParameters" : "--jars local:///usr/share/aws/iceberg/lib/iceberg-spark3-runtime.jar"}}'
   ```

1. Sertakan konfigurasi tambahan Iceberg:

   ```
   --configuration-overrides '{
       "applicationConfiguration": [
       "classification" : "spark-defaults", 
       "properties" : {
           "spark.sql.catalog.dev.warehouse" : "s3://amzn-s3-demo-bucket/EXAMPLE-PREFIX/ ", 
           "spark.sql.extensions ":" org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions ", 
           "spark.sql.catalog.dev" : "org.apache.iceberg.spark.SparkCatalog",
           "spark.sql.catalog.dev.catalog-impl" : "org.apache.iceberg.aws.glue.GlueCatalog",
           "spark.sql.catalog.dev.io-impl": "org.apache.iceberg.aws.s3.S3FileIO"
           }
       ]
   }'
   ```

[Untuk mempelajari lebih lanjut tentang EMR versi rilis Apache Iceberg, lihat Riwayat rilis Iceberg.](https://docs.aws.amazon.com/emr/latest/ReleaseGuide/Iceberg-release-history.html)

## Konfigurasi sesi percikan untuk integrasi katalog
<a name="iceberg-with-lake-formation-spark-catalog-integration-lf-eks"></a>

### Konfigurasi sesi percikan untuk integrasi katalog Iceberg AWS Glue
<a name="iceberg-with-lake-formation-spark-catalog-integration-lf-glue"></a>

Contoh ini menunjukkan cara mengintegrasikan Iceberg dengan: Perayap AWS Glue

```
spark-sql \
  --conf spark.sql.catalog.rms = org.apache.iceberg.spark.SparkCatalog \
  --conf spark.sql.catalog.rms.type = glue \
  --conf spark.sql.catalog.rms.glue.id = glue RMS catalog ID \
  --conf spark.sql.catalog.rms.glue.account-id = AWS account ID \
  
  --conf spark.sql.extensions=
    org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
```

Berikut ini menunjukkan contoh query:

```
SELECT * FROM rms.rmsdb.table1
```

### Konfigurasi sesi percikan untuk integrasi katalog Iceberg REST AWS Glue
<a name="iceberg-with-lake-formation-spark-catalog-integration-lf-rest"></a>

Contoh ini menunjukkan cara mengintegrasikan Iceberg REST dengan: Perayap AWS Glue

```
spark-sql \
  --conf spark.sql.catalog.rms = org.apache.iceberg.spark.SparkCatalog \
  --conf spark.sql.catalog.rms.type = rest \
  --conf spark.sql.catalog.rms.warehouse = glue RMS catalog ID \
  --conf spark.sql.catalog.rms.uri = glue endpoint URI/iceberg \
  --conf spark.sql.catalog.rms.rest.sigv4-enabled = true \
  --conf spark.sql.catalog.rms.rest.signing-name = glue \
  
  --conf spark.sql.extensions=
    org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
```

Berikut ini menunjukkan contoh query:

```
SELECT * FROM rms.rmsdb.table1
```

Konfigurasi ini hanya berfungsi untuk Redshift Managed Storage. FGAC untuk Amazon S3 tidak didukung.