Yeah this is actually a good point, the documentation is mostly around loading the catalog to different SQL engines and lacks Java API examples. The integration tests are good places to see Java examples: https://github.com/apache/iceberg/blob/master/aws/src/integration/java/org/apache/iceberg/aws/glue/GlueTestBase.java
-Jack Ye On Wed, Jul 7, 2021 at 1:27 PM Greg Hill <gnh...@paypal.com.invalid> wrote: > Is there a Java example for the proper way to get the GlueCatalog object? > We are trying to convert from HadoopTables and need access to the > lower-level APIs to create and update tables with partitions. > > > > I’m looking for something similar to these examples for HadoopTables and > HiveCatalog: https://iceberg.apache.org/java-api-quickstart/ > > > > From what I can gather looking at the code, this is what I came up with > (our catalog name is `iceberg`), but it feels like there’s probably a > better way that I’m not seeing: > > > > this.icebergCatalog = new GlueCatalog(); > > Configuration conf = spark.sparkContext().hadoopConfiguration(); > > Map<String, String> props = ImmutableMap.of( > > "type", conf.get("spark.sql.catalog.iceberg.type"), > > "warehouse", conf.get("spark.sql.catalog.iceberg.warehouse"), > > "lock-impl", conf.get("spark.sql.catalog.iceberg.lock-impl"), > > "lock.table", conf.get("spark.sql.catalog.iceberg.lock.table"), > > "io-impl", conf.get("spark.sql.catalog.iceberg.io-impl") > > ); > > this.icebergCatalog.initialize("iceberg", props); > > > > Sorry for the potentially n00b question, but I’m a n00b 😃 > > > > Greg >