Continuation from the previous PR to support Glue catalog. Add support for more namespace and table operations. In the next PR, remaining operations will be added to complete Glue catalog for tables (e.g. create table).
I mostly followed the same semantics as the pyiceberg Glue catalog for the implementation. This means that Glue database fields (description and location URI) are stored as props. Error handling are also done in a similar way.
Testing
Unit tests are added. I am not sure if the project has AWS Glue set up (or some sort of realistic mock) for integration testing but I did not see it run as part of the CI actions.
Updated cmd/iceberg/main.go and manually tested using my personal AWS account:
> go run ./cmd/iceberg create --catalog glue --description "my new catalog" --location-uri "s3://test-namespace/" namespace apache-iceberg-test-00006
> go run ./cmd/iceberg describe --catalog glue namespace apache-iceberg-test-00006
┌──────────────────────────────────────┐
| Key | Value |
| ------------------------------------ |
| database_type | ICEBERG |
| Description | my new catalog |
| Location | s3://test-namespace/ |
└──────────────────────────────────────┘
> go run ./cmd/iceberg list --catalog glue
┌───────────────────────────┐
| IDs |
| ------------------------- |
| apache-iceberg-test-00001 |
| apache-iceberg-test-00002 |
| apache-iceberg-test-00003 |
| apache-iceberg-test-00004 |
| apache-iceberg-test-00005 |
| apache-iceberg-test-00006 |
└───────────────────────────┘
> go run ./cmd/iceberg properties --catalog glue get namespace apache-iceberg-test-00006 Description
my new catalog
> go run ./cmd/iceberg properties --catalog glue set namespace apache-iceberg-test-00006 Description "updated description"
updated Description on apache-iceberg-test-00006
> go run ./cmd/iceberg properties --catalog glue get namespace apache-iceberg-test-00006 Description
updated description
> go run ./cmd/iceberg describe --catalog glue namespace apache-iceberg-test-00006
┌──────────────────────────────────────┐
| Key | Value |
| ------------------------------------ |
| Description | updated description |
| Location | s3://test-namespace/ |
| database_type | ICEBERG |
└──────────────────────────────────────┘
Continuation from the previous PR to support Glue catalog. Add support for more namespace and table operations. In the next PR, remaining operations will be added to complete Glue catalog for tables (e.g. create table).
I mostly followed the same semantics as the pyiceberg Glue catalog for the implementation. This means that Glue database fields (description and location URI) are stored as props. Error handling are also done in a similar way.
Testing
Updated
cmd/iceberg/main.go
and manually tested using my personal AWS account: