Skip to content

Commit

Permalink
cmd/iceberg: Pass default aws config to glue catalog constructor (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
glkz authored Nov 8, 2024
1 parent ac5c84d commit ac8d30a
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/iceberg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit ac8d30a

Please sign in to comment.