Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions cmd/iceberg/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Options:
--output TYPE output type (json/text) [default: text]
--credential TEXT specify credentials for the catalog
--warehouse TEXT specify the warehouse to use
--scope TEXT specify the OAuth scope for authentication [default: catalog]
--config TEXT specify the path to the configuration file
--description TEXT specify a description for the namespace
--location-uri TEXT specify a location URI for the namespace
Expand Down Expand Up @@ -120,6 +121,7 @@ type Config struct {
Cred string `docopt:"--credential"`
Warehouse string `docopt:"--warehouse"`
Config string `docopt:"--config"`
Scope string `docopt:"--scope"`
Description string `docopt:"--description"`
LocationURI string `docopt:"--location-uri"`
SchemaStr string `docopt:"--schema"`
Expand Down Expand Up @@ -165,6 +167,10 @@ func main() {
opts = append(opts, rest.WithWarehouseLocation(cfg.Warehouse))
}

if len(cfg.Scope) > 0 {
opts = append(opts, rest.WithScope(cfg.Scope))
}

if cat, err = rest.NewCatalog(ctx, "rest", cfg.URI, opts...); err != nil {
log.Fatal(err)
}
Expand Down
Loading