You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ze...@apache.org on 2025/02/18 23:26:17 UTC
(iceberg-go) branch main updated: docs(cmd/iceberg): Added description of CLI usage in README (#301)
This is an automated email from the ASF dual-hosted git repository.
zeroshade 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 3517948 docs(cmd/iceberg): Added description of CLI usage in README (#301)
3517948 is described below
commit 3517948bdc80f7e4b4cdf135fa3b110752ea2749
Author: Kanthi <su...@gmail.com>
AuthorDate: Tue Feb 18 17:26:13 2025 -0600
docs(cmd/iceberg): Added description of CLI usage in README (#301)
Added description of CLI usage in README similar to pyiceberg.
https://py.iceberg.apache.org/cli/
---------
Co-authored-by: Matt Topol <zo...@gmail.com>
---
README.md | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/README.md b/README.md
index fa3a012..90a3b20 100644
--- a/README.md
+++ b/README.md
@@ -85,6 +85,44 @@ $ 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
+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.
+
+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/)