From 711d688199f51497653d09b6d3c128c135cb0b43 Mon Sep 17 00:00:00 2001 From: Kanthi Subramanian Date: Thu, 13 Feb 2025 18:24:21 -0500 Subject: [PATCH 1/3] Added description of CLI usage in README --- README.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/README.md b/README.md index 5303c07c..b51c7fc8 100644 --- a/README.md +++ b/README.md @@ -82,6 +82,42 @@ $ cd iceberg-go/cmd/iceberg && go build . * Plan to add [Apache Arrow](https://pkg.go.dev/github.com/apache/arrow-go/) support eventually. * Data can currently be read as an Arrow Table or as a stream of Arrow record batches. + +### CLI Usage +The `iceberg` CLI usage is very similar to [pyiceberg CLI](https://py.iceberg.apache.org/cli/) \ +You can pass the catalog URI with `--uri` argument. + +Example: +You can start the Iceberg REST API docker image which runs on default in port `8181` +``` +docker pull tabulario/iceberg-rest:latest +docker run -p 8181:8181 tabulario/iceberg-rest:latest +``` +and run the `iceberg` CLI pointing to the REST API server. + +``` + ./iceberg --uri http://0.0.0.0:8181 list +┌─────┐ +| IDs | +| --- | +└─────┘ +``` +**Create Namespace** +``` +./iceberg --uri http://0.0.0.0:8181 create namespace taxitrips +``` + +**List Namespace** +``` + ./iceberg --uri http://0.0.0.0:8181 list +┌───────────┐ +| IDs | +| --------- | +| taxitrips | +└───────────┘ + + +``` # Get in Touch - [Iceberg community](https://iceberg.apache.org/community/) From f005901e747328484fadc0854d0fc3a5c271b53c Mon Sep 17 00:00:00 2001 From: Kanthi Subramanian Date: Tue, 18 Feb 2025 17:46:52 -0500 Subject: [PATCH 2/3] Added instructions to build CLI command. --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index b51c7fc8..74d5ea1d 100644 --- a/README.md +++ b/README.md @@ -84,6 +84,9 @@ $ cd iceberg-go/cmd/iceberg && go build . ### CLI Usage +Run `go build` command to build the CLI command. +The CLI executable(`iceberg`) will be available in `cmd/iceberg` path. + The `iceberg` CLI usage is very similar to [pyiceberg CLI](https://py.iceberg.apache.org/cli/) \ You can pass the catalog URI with `--uri` argument. From 2d2a2ea37be9776234e26d94a1f7291692a51c88 Mon Sep 17 00:00:00 2001 From: Kanthi Date: Tue, 18 Feb 2025 18:16:15 -0500 Subject: [PATCH 3/3] Update README.md Updated instructions to build iceberg CLI command Co-authored-by: Matt Topol --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 74d5ea1d..e2874d8f 100644 --- a/README.md +++ b/README.md @@ -84,8 +84,7 @@ $ cd iceberg-go/cmd/iceberg && go build . ### CLI Usage -Run `go build` command to build the CLI command. -The CLI executable(`iceberg`) will be available in `cmd/iceberg` path. +Run `go build ./cmd/iceberg` from the root of this repository to build the CLI executable, alternately you can run `go install github.com/apache/iceberg-go/cmd/iceberg` to install it to the `bin` directory of your `GOPATH`. The `iceberg` CLI usage is very similar to [pyiceberg CLI](https://py.iceberg.apache.org/cli/) \ You can pass the catalog URI with `--uri` argument.