Skip to content

Commit

Permalink
Update user document
Browse files Browse the repository at this point in the history
  • Loading branch information
orenccl committed Nov 6, 2024
1 parent 16bae68 commit 01456c7
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions clients/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Apache Gravitino CLI is a command-line tool that interacts with the Gravitino se
## Table of Contents

- [Installation](#installation)
- [Table Commands](#table-commands)
- [Running Tests](#running-tests)
- [Contributing](#contributing)
- [License](#license)
Expand Down Expand Up @@ -59,6 +60,75 @@ Before you can build and run this project, it is suggested you have the followin
gcli --help
```

## Table Commands

The CLI supports the following operations for tables:

### List Tables

Lists all tables in a specified schema.

```bash
gcli table list --metalake <metalake_name> --name <catalog_name>.<schema_name>
```

Example:
```bash
gcli table list --metalake metalake_demo --name catalog_mysql.db
```

### Show Table Details

Shows detailed information about a specific table.

```bash
gcli table details --metalake <metalake_name> --name <catalog_name>.<schema_name>.<table_name>
```

Example:
```bash
gcli table details --metalake metalake_demo --name catalog_mysql.db.iceberg_namespace_properties
```

### List Table Indexes

Shows all indexes defined for a specific table.

```bash
gcli table details --metalake <metalake_name> --name <catalog_name>.<schema_name>.<table_name> --index
```

Example:
```bash
gcli table details --metalake metalake_demo --name catalog_mysql.db.iceberg_namespace_properties --index
```

### Create Table

Creates a new table.

```bash
gcli table create --metalake <metalake_name> --name <catalog_name>.<schema_name>.<table_name>
```

Example:
```bash
gcli table create --metalake metalake_demo --name catalog_mysql.db.iceberg_namespace_properties
```

### Delete Table

Deletes a specified table.

```bash
gcli table delete --metalake <metalake_name> --name <catalog_name>.<schema_name>.<table_name>
```

Example:
```bash
gcli table delete --metalake metalake_demo --name catalog_mysql.db.iceberg_namespace_properties
```

## Running Tests

This project includes a suite of unit tests to verify its functionality.
Expand Down

0 comments on commit 01456c7

Please sign in to comment.