This is an automated email from the ASF dual-hosted git repository.

fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-go.git


The following commit(s) were added to refs/heads/main by this push:
     new ac8d30a  cmd/iceberg: Pass default aws config to glue catalog 
constructor (#187)
ac8d30a is described below

commit ac8d30aa0bab07a61d6c35cd6ef759242d7416a1
Author: Mustafa Altun <[email protected]>
AuthorDate: Fri Nov 8 09:50:46 2024 +0100

    cmd/iceberg: Pass default aws config to glue catalog constructor (#187)
---
 cmd/iceberg/main.go | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/cmd/iceberg/main.go b/cmd/iceberg/main.go
index a44ffb6..de2479f 100644
--- a/cmd/iceberg/main.go
+++ b/cmd/iceberg/main.go
@@ -29,6 +29,8 @@ import (
        "github.com/apache/iceberg-go/catalog"
        "github.com/apache/iceberg-go/config"
        "github.com/apache/iceberg-go/table"
+
+       awsconfig "github.com/aws/aws-sdk-go-v2/config"
        "github.com/docopt/docopt-go"
 )
 
@@ -149,7 +151,13 @@ func main() {
                        log.Fatal(err)
                }
        case catalog.Glue:
-               opts := []catalog.Option[catalog.GlueCatalog]{}
+               awscfg, err := awsconfig.LoadDefaultConfig(context.Background())
+               if err != nil {
+                       log.Fatal(err)
+               }
+               opts := []catalog.Option[catalog.GlueCatalog]{
+                       catalog.WithAwsConfig(awscfg),
+               }
                cat = catalog.NewGlueCatalog(opts...)
        default:
                log.Fatal("unrecognized catalog type")

Reply via email to