salah-djb commented on issue #10524:
URL: https://github.com/apache/iceberg/issues/10524#issuecomment-2655977524

   Hi guys, 
   To read hive tables from glue catalog you have to patch/build the catalog 
client like [explained 
here](https://github.com/awslabs/aws-glue-data-catalog-client-for-apache-hive-metastore?tab=readme-ov-file#patching-apache-hive-and-installing-it-locally)
   and define spark configuration for this tables (credentials, catalog id etc) 
something like:
   
   ```
   spark.hadoop.aws.catalog.credentials.provider.factory.class=*****
   spark.hadoop.aws.glue.assumed.role.arn=*****
   spark.hadoop.aws.glue.endpoint=*****
   spark.hadoop.aws.region=*****
   spark.hadoop.fs.s3a.assumed.role.arn=*****
   
spark.hadoop.fs.s3a.assumed.role.credentials.provider=com.amazonaws.auth.WebIdentityTokenCredentialsProvider
   
spark.hadoop.fs.s3a.aws.credentials.provider=org.apache.hadoop.fs.s3a.auth.AssumedRoleCredentialProvider
   spark.hadoop.fs.s3a.endpoint=*****
   
spark.hadoop.hive.imetastoreclient.factory.class=com.amazonaws.glue.catalog.metastore.AWSGlueDataCatalogHiveClientFactory
   spark.hadoop.hive.metastore.glue.catalogid=*****
   
   ```
   
   On top of that if you want to read/write iceberg tables, you must add 
dependencies for iceberg and add the following configurations (when assuming 
aws role, otherwise you can also pass pair of access/secret keys)
   ```
   
spark.sql.catalog.spark_catalog.catalog-impl=org.apache.iceberg.aws.glue.GlueCatalog
   spark.sql.catalog.spark_catalog.client.assume-role.arn=*****
   spark.sql.catalog.spark_catalog.client.assume-role.region=*****
   
spark.sql.catalog.spark_catalog.client.factory=org.apache.iceberg.aws.AssumeRoleAwsClientFactory
   spark.sql.catalog.spark_catalog.glue.id=*****
   spark.sql.catalog.spark_catalog.io-impl=org.apache.iceberg.aws.s3.S3FileIO
   spark.sql.catalog.spark_catalog.metrics-reporter-impl=*****
   spark.sql.catalog.spark_catalog=org.apache.iceberg.spark.SparkSessionCatalog
   spark.sql.defaultCatalog=spark_catalog
   
spark.sql.extensions=org.apache.iceberg.spark.extensions.IcebergSparkSessionExtensions
   
   ```
   Hope it helps


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to