Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#6603] chore(*): fix CLI.sh can't find the Jar (#6686)

Lord of Abyss95bff7994449
diff --git a/bin/gcli.sh.template b/bin/gcli.sh.template
new file mode 100644
index 0000000000..cfa61c2a1a
--- /dev/null
+++ b/bin/gcli.sh.template
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# Referred from Apache Submarine's common.sh implementation
+# bin/common.sh
+
+set -e
+
+bin="$(dirname "${BASH_SOURCE-$0}")"
+bin="$(cd "${bin}">/dev/null; pwd)"
+
+. "${bin}/common.sh"
+
+AUXLIB_DIR="${GRAVITINO_HOME}/auxlib"
+
+# Search strategy for finding the Gravitino CLI JAR:
+if [ -z "$CLI_JAR" ]; then
+ CLI_JAR=$(find "${AUXLIB_DIR}" -name "gravitino-cli-*.jar" 2>/dev/null)
+fi
+
+if [ -z "$CLI_JAR" ]; then
+ echo "ERROR: Could not find CLI jar in ${AUXLIB_DIR}"
+ exit 1
+fi
+
+$JAVA_RUNNER -jar "$CLI_JAR" "$@"
\ No newline at end of file
diff --git a/build.gradle.kts b/build.gradle.kts
index 4b0131541a..6c2428f2b1 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -600,6 +600,7 @@ tasks {
"copyCatalogLibAndConfigs",
"copySubprojectDependencies",
"copySubprojectLib",
+ "copyCliLib",
":authorizations:copyLibAndConfig",
":iceberg:iceberg-rest-server:copyLibAndConfigs",
":web:web:build"
@@ -817,6 +818,14 @@ tasks {
}
}
+ register("copyCliLib", Copy::class) {
+ dependsOn("clients:cli:build")
+ from("clients/cli/build/libs")
+ into("distribution/package/auxlib")
+ include("gravitino-cli-*.jar")
+ setDuplicatesStrategy(DuplicatesStrategy.EXCLUDE)
+ }
+
register("copySubprojectLib", Copy::class) {
subprojects.forEach() {
if (!it.name.startsWith("authorization") &&
diff --git a/clients/cli/README.md b/clients/cli/README.md
index 38f5b03dd1..23d1e672b5 100644
--- a/clients/cli/README.md
+++ b/clients/cli/README.md
@@ -23,10 +23,14 @@ Apache Gravitino CLI is a command-line tool that interacts with the Gravitino se
## Table of Contents
-- [Installation](#installation)
-- [Running Tests](#running-tests)
-- [Contributing](#contributing)
-- [License](#license)
+- [Apache Gravitino Command Line Interface](#apache-gravitino-command-line-interface)
+ - [Table of Contents](#table-of-contents)
+ - [Installation](#installation)
+ - [Prerequisites](#prerequisites)
+ - [Build the Project](#build-the-project)
+ - [Running Tests](#running-tests)
+ - [Contributing](#contributing)
+ - [License](#license)
## Installation
@@ -49,14 +53,12 @@ Before you can build and run this project, it is suggested you have the followin
```bash
./gradlew :clients:cli:build
```
-3. Create an alias:
- ```bash
- alias gcli='java -jar clients/cli/build/libs/gravitino-cli-*-incubating-SNAPSHOT.jar'
- ```
3. Test the command:
+
```bash
- gcli --help
+ cd /path/to/gravitino
+ bin/gcli.sh --help
```
## Running Tests
diff --git a/docs/cli.md b/docs/cli.md
index ebf4a38506..9d7644f934 100644
--- a/docs/cli.md
+++ b/docs/cli.md
@@ -10,29 +10,23 @@ license: 'This software is licensed under the Apache License version 2.'
This document provides guidance on managing metadata within Apache Gravitino using the Command Line Interface (CLI). The CLI offers a terminal based alternative to using code or the REST interface for metadata management.
-Currently, the CLI allows users to view metadata information for metalakes, catalogs, schemas, tables, users, roles, groups, tags, topics and filesets. Future updates will expand on these capabilities.
+Currently, the CLI allows users to view, create and update metadata information for metalakes, catalogs, schemas, tables, models, columns, users, roles, groups, tags, topics and filesets. Future updates will expand on these capabilities.
## Running the CLI
-You can configure an alias for the CLI for ease of use, with the following command:
-
-```bash
-alias gcli='java -jar ../../cli/build/libs/gravitino-cli-*-incubating-SNAPSHOT.jar'
-```
-
-Or you use the `gcli.sh` script found in the `clients/cli/bin/` directory to run the CLI.
+To run the Gravitino CLI, please use the `gcli.sh` script located in Gravitino's bin directory. If you define the `GRAVITINO_HOME` environment variable, you can run the script from any location using `$GRAVITINO_HOME/bin/gcli.sh`.
## Usage
-The general structure for running commands with the Gravitino CLI is `gcli entity command [options]`.
+The general structure for running commands with the Gravitino CLI is `gcli.sh entity command [options]`.
```bash
- usage: gcli [metalake|catalog|schema|model|table|column|user|group|tag|topic|fileset] [list|details|create|delete|update|set|remove|properties|revoke|grant] [options]
+ usage: gcli.sh [metalake|catalog|schema|model|table|column|user|group|tag|topic|fileset] [list|details|create|delete|update|set|remove|properties|revoke|grant] [options]
Options
usage: gcli
- -a,--audit display audit information
+ -a,--audit display audit information
--alias <arg> model aliases
- --all all operation for --enable
+ --all on all entities
--auto <arg> column value auto-increments (true/false)
-c,--comment <arg> entity comment
--columnfile <arg> CSV file describing columns
@@ -57,6 +51,7 @@ The general structure for running commands with the Gravitino CLI is `gcli entit
--partition display partition information
--position <arg> position of column
--privilege <arg> privilege(s)
+ --quiet quiet mode
-r,--role <arg> role name
--rename <arg> new entity name
-s,--server Gravitino server version
@@ -169,7 +164,7 @@ All the commands are performed by using the [Java API](api/java-api) internally.
To display help on command usage:
```bash
-gcli --help
+gcli.sh --help
```
### Display client version
@@ -177,7 +172,7 @@ gcli --help
To display the client version:
```bash
-gcli --version
+gcli.sh --version
```
### Display server version
@@ -185,7 +180,7 @@ gcli --version
To display the server version:
```bash
-gcli --server
+gcli.sh --server
```
### Client/server version mismatch
@@ -200,15 +195,15 @@ If the client and server are running different versions of the Gravitino softwar
For commands that accept multiple properties they can be specified in a couple of different ways:
-1. gcli --properties n1=v1,n2=v2,n3=v3
+1. gcli.sh --properties n1=v1,n2=v2,n3=v3
-2. gcli --properties n1=v1 n2=v2 n3=v3
+2. gcli.sh --properties n1=v1 n2=v2 n3=v3
-3. gcli --properties n1=v1 --properties n2=v2 --properties n3=v3
+3. gcli.sh --properties n1=v1 --properties n2=v2 --properties n3=v3
### Setting properties and tags
- Different options are needed to add a tag and set a property of a tag with `gcli tag set`. To add a
+ Different options are needed to add a tag and set a property of a tag with `gcli.sh tag set`. To add a
tag, specify the tag (via --tag) and the entity to tag (via --name). To set the property of a tag
(via --tag) you need to specify the property (via --property) and value (via --value) you want to
set.
@@ -225,79 +220,79 @@ Please set the metalake in the Gravitino configuration file or the environment v
#### Show all metalakes
```bash
-gcli metalake list
+gcli.sh metalake list
```
#### Show a metalake details
```bash
-gcli metalake details
+gcli.sh metalake details
```
#### Show a metalake's audit information
```bash
-gcli metalake details --audit
+gcli.sh metalake details --audit
```
#### Create a metalake
```bash
-gcli metalake create --metalake my_metalake --comment "This is my metalake"
+gcli.sh metalake create --metalake my_metalake --comment "This is my metalake"
```
#### Delete a metalake
```bash
-gcli metalake delete
+gcli.sh metalake delete
```
#### Rename a metalake
```bash
-gcli metalake update --rename demo
+gcli.sh metalake update --rename demo
```
#### Update a metalake's comment
```bash
-gcli metalake update --comment "new comment"
+gcli.sh metalake update --comment "new comment"
```
#### Display a metalake's properties
```bash
-gcli metalake properties
+gcli.sh metalake properties
```
#### Set a metalake's property
```bash
-gcli metalake set --property test --value value
+gcli.sh metalake set --property test --value value
```
#### Remove a metalake's property
```bash
-gcli metalake remove --property test
+gcli.sh metalake remove --property test
```
#### Enable a metalake
```bash
-gcli metalake update -m metalake_demo --enable
+gcli.sh metalake update -m metalake_demo --enable
```
#### Enable a metalake and all catalogs
```bash
-gcli metalake update -m metalake_demo --enable --all
+gcli.sh metalake update -m metalake_demo --enable --all
```
#### Disable a metalake
```bash
-gcli metalake update -m metalake_demo --disable
+gcli.sh metalake update -m metalake_demo --disable
```
### Catalog commands
@@ -305,19 +300,19 @@ gcli metalake update -m metalake_demo --disable
#### Show all catalogs in a metalake
```bash
-gcli catalog list
+gcli.sh catalog list
```
#### Show a catalog details
```bash
-gcli catalog details --name catalog_postgres
+gcli.sh catalog details --name catalog_postgres
```
#### Show a catalog's audit information
```bash
-gcli catalog details --name catalog_postgres --audit
+gcli.sh catalog details --name catalog_postgres --audit
```
#### Creating a catalog
@@ -327,109 +322,109 @@ The type of catalog to be created is specified by the `--provider` option. Diffe
##### Create a Hive catalog
```bash
-gcli catalog create --name hive --provider hive --properties metastore.uris=thrift://hive-host:9083
+gcli.sh catalog create --name hive --provider hive --properties metastore.uris=thrift://hive-host:9083
```
##### Create an Iceberg catalog
```bash
-gcli catalog create -name iceberg --provider iceberg --properties uri=thrift://hive-host:9083,catalog-backend=hive,warehouse=hdfs://hdfs-host:9000/user/iceberg/warehouse
+gcli.sh catalog create -name iceberg --provider iceberg --properties uri=thrift://hive-host:9083,catalog-backend=hive,warehouse=hdfs://hdfs-host:9000/user/iceberg/warehouse
```
##### Create a MySQL catalog
```bash
-gcli catalog create -name mysql --provider mysql --properties jdbc-url=jdbc:mysql://mysql-host:3306?useSSL=false,jdbc-user=user,jdbc-password=password,jdbc-driver=com.mysql.cj.jdbc.Driver
+gcli.sh catalog create -name mysql --provider mysql --properties jdbc-url=jdbc:mysql://mysql-host:3306?useSSL=false,jdbc-user=user,jdbc-password=password,jdbc-driver=com.mysql.cj.jdbc.Driver
```
##### Create a Postgres catalog
```bash
-gcli catalog create -name postgres --provider postgres --properties jdbc-url=jdbc:postgresql://postgresql-host/mydb,jdbc-user=user,jdbc-password=password,jdbc-database=db,jdbc-driver=org.postgresql.Driver
+gcli.sh catalog create -name postgres --provider postgres --properties jdbc-url=jdbc:postgresql://postgresql-host/mydb,jdbc-user=user,jdbc-password=password,jdbc-database=db,jdbc-driver=org.postgresql.Driver
```
##### Create a Kafka catalog
```bash
-gcli catalog create --name kafka --provider kafka --properties bootstrap.servers=127.0.0.1:9092,127.0.0.2:9092
+gcli.sh catalog create --name kafka --provider kafka --properties bootstrap.servers=127.0.0.1:9092,127.0.0.2:9092
```
##### Create a Doris catalog
```bash
-gcli catalog create --name doris --provider doris --properties jdbc-url=jdbc:mysql://localhost:9030,jdbc-driver=com.mysql.jdbc.Driver,jdbc-user=admin,jdbc-password=password
+gcli.sh catalog create --name doris --provider doris --properties jdbc-url=jdbc:mysql://localhost:9030,jdbc-driver=com.mysql.jdbc.Driver,jdbc-user=admin,jdbc-password=password
```
##### Create a Paimon catalog
```bash
-gcli catalog create --name paimon --provider paimon --properties catalog-backend=jdbc,uri=jdbc:mysql://127.0.0.1:3306/metastore_db,authentication.type=simple
+gcli.sh catalog create --name paimon --provider paimon --properties catalog-backend=jdbc,uri=jdbc:mysql://127.0.0.1:3306/metastore_db,authentication.type=simple
```
#### Create a Hudi catalog
```bash
-gcli catalog create --name hudi --provider hudi --properties catalog-backend=hms,uri=thrift://127.0.0.1:9083
+gcli.sh catalog create --name hudi --provider hudi --properties catalog-backend=hms,uri=thrift://127.0.0.1:9083
```
#### Create an Oceanbase catalog
```bash
-gcli catalog create --name oceanbase --provider oceanbase --properties jdbc-url=jdbc:mysql://localhost:2881,jdbc-driver=com.mysql.jdbc.Driver,jdbc-user=admin,jdbc-password=password
+gcli.sh catalog create --name oceanbase --provider oceanbase --properties jdbc-url=jdbc:mysql://localhost:2881,jdbc-driver=com.mysql.jdbc.Driver,jdbc-user=admin,jdbc-password=password
```
#### Delete a catalog
```bash
-gcli catalog delete --name hive
+gcli.sh catalog delete --name hive
```
#### Rename a catalog
```bash
-gcli catalog update --name catalog_mysql --rename mysql
+gcli.sh catalog update --name catalog_mysql --rename mysql
```
#### Change a catalog comment
```bash
-gcli catalog update --name catalog_mysql --comment "new comment"
+gcli.sh catalog update --name catalog_mysql --comment "new comment"
```
#### Display a catalog's properties
```bash
-gcli catalog properties --name catalog_mysql
+gcli.sh catalog properties --name catalog_mysql
```
#### Set a catalog's property
```bash
-gcli catalog set --name catalog_mysql --property test --value value
+gcli.sh catalog set --name catalog_mysql --property test --value value
```
#### Remove a catalog's property
```bash
-gcli catalog remove --name catalog_mysql --property test
+gcli.sh catalog remove --name catalog_mysql --property test
```
#### Enable a catalog
```bash
-gcli catalog update -m metalake_demo --name catalog --enable
+gcli.sh catalog update -m metalake_demo --name catalog --enable
```
#### Enable a catalog and it's metalake
```bash
-gcli catalog update -m metalake_demo --name catalog --enable --all
+gcli.sh catalog update -m metalake_demo --name catalog --enable --all
```
#### Disable a catalog
```bash
-gcli catalog update -m metalake_demo --name catalog --disable
+gcli.sh catalog update -m metalake_demo --name catalog --disable
```
### Schema commands
@@ -437,31 +432,31 @@ gcli catalog update -m metalake_demo --name catalog --disable
#### Show all schemas in a catalog
```bash
-gcli schema list --name catalog_postgres
+gcli.sh schema list --name catalog_postgres
```
#### Show schema details
```bash
-gcli schema details --name catalog_postgres.hr
+gcli.sh schema details --name catalog_postgres.hr
```
#### Show schema's audit information
```bash
-gcli schema details --name catalog_postgres.hr --audit
+gcli.sh schema details --name catalog_postgres.hr --audit
```
#### Create a schema
```bash
-gcli schema create --name catalog_postgres.new_db
+gcli.sh schema create --name catalog_postgres.new_db
```
#### Display schema properties
```bash
-gcli schema properties --name catalog_postgres.hr
+gcli.sh schema properties --name catalog_postgres.hr
```
Setting and removing schema properties is not currently supported by the Java API or the Gravitino CLI.
@@ -471,6 +466,7 @@ Setting and removing schema properties is not currently supported by the Java AP
When creating a table the columns are specified in CSV file specifying the name of the column, the datatype, a comment, true or false if the column is nullable, true or false if the column is auto incremented, a default value and a default type. Not all of the columns need to be specifed just the name and datatype columns. If not specified comment default to null, nullability to true and auto increment to false. If only the default value is specified it defaults to the same data type as the column.
Example CSV file
+
```text
Name,Datatype,Comment,Nullable,AutoIncrement,DefaultValue,DefaultType
name,String,person's name
@@ -481,71 +477,73 @@ location,String,city they work in,false,false,Sydney,String
#### Show all tables
```bash
-gcli table list --name catalog_postgres.hr
+gcli.sh table list --name catalog_postgres.hr
```
#### Show tables details
```bash
-gcli table details --name catalog_postgres.hr.departments
+gcli.sh table details --name catalog_postgres.hr.departments
```
#### Show tables audit information
```bash
-gcli table details --name catalog_postgres.hr.departments --audit
+gcli.sh table details --name catalog_postgres.hr.departments --audit
```
#### Show tables distribution information
+
```bash
-gcli table details --name catalog_postgres.hr.departments --distribution
+gcli.sh table details --name catalog_postgres.hr.departments --distribution
```
#### Show tables partition information
+
```bash
-gcli table details --name catalog_postgres.hr.departments --partition
+gcli.sh table details --name catalog_postgres.hr.departments --partition
```
#### Show tables sort order information
+
```bash
-gcli table details --name catalog_postgres.hr.departments --sortorder
+gcli.sh table details --name catalog_postgres.hr.departments --sortorder
```
### Show table indexes
```bash
-gcli table details --name catalog_mysql.db.iceberg_namespace_properties --index
+gcli.sh table details --name catalog_mysql.db.iceberg_namespace_properties --index
```
#### Delete a table
```bash
-gcli table delete --name catalog_postgres.hr.salaries
+gcli.sh table delete --name catalog_postgres.hr.salaries
```
-
#### Display a tables's properties
```bash
-gcli table properties --name catalog_postgres.hr.salaries
+gcli.sh table properties --name catalog_postgres.hr.salaries
```
#### Set a tables's property
```bash
-gcli table set --name catalog_postgres.hr.salaries --property test --value value
+gcli.sh table set --name catalog_postgres.hr.salaries --property test --value value
```
#### Remove a tables's property
```bash
-gcli table remove --name catalog_postgres.hr.salaries --property test
+gcli.sh table remove --name catalog_postgres.hr.salaries --property test
```
#### Create a table
```bash
-gcli table create --name catalog_postgres.hr.salaries --comment "comment" --columnfile ~/table.csv
+gcli.sh table create --name catalog_postgres.hr.salaries --comment "comment" --columnfile ~/table.csv
```
### User commands
@@ -553,31 +551,31 @@ gcli table create --name catalog_postgres.hr.salaries --comment "comment" --colu
#### Create a user
```bash
-gcli user create --user new_user
+gcli.sh user create --user new_user
```
#### Show a user's details
```bash
-gcli user details --user new_user
+gcli.sh user details --user new_user
```
#### List all users
```bash
-gcli user list
+gcli.sh user list
```
#### Show a roles's audit information
```bash
-gcli user details --user new_user --audit
+gcli.sh user details --user new_user --audit
```
#### Delete a user
```bash
-gcli user delete --user new_user
+gcli.sh user delete --user new_user
```
### Group commands
@@ -585,31 +583,31 @@ gcli user delete --user new_user
#### Create a group
```bash
-gcli group create --group new_group
+gcli.sh group create --group new_group
```
#### Display a group's details
```bash
-gcli group details --group new_group
+gcli.sh group details --group new_group
```
#### List all groups
```bash
-gcli group list
+gcli.sh group list
```
#### Show a groups's audit information
```bash
-gcli group details --group new_group --audit
+gcli.sh group details --group new_group --audit
```
#### Delete a group
```bash
-gcli group delete --group new_group
+gcli.sh group delete --group new_group
```
### Tag commands
@@ -617,79 +615,79 @@ gcli group delete --group new_group
#### Display a tag's details
```bash
-gcli tag details --tag tagA
+gcli.sh tag details --tag tagA
```
#### Create tags
```bash
-gcli tag create --tag tagA tagB
+gcli.sh tag create --tag tagA tagB
```
#### List all tags
```bash
-gcli tag list
+gcli.sh tag list
```
#### Delete tags
```bash
-gcli tag delete --tag tagA tagB
+gcli.sh tag delete --tag tagA tagB
```
#### Add tags to an entity
```bash
-gcli tag set --name catalog_postgres.hr --tag tagA tagB
+gcli.sh tag set --name catalog_postgres.hr --tag tagA tagB
```
#### Remove tags from an entity
```bash
-gcli tag remove --name catalog_postgres.hr --tag tagA tagB
+gcli.sh tag remove --name catalog_postgres.hr --tag tagA tagB
```
#### Remove all tags from an entity
```bash
-gcli tag remove --name catalog_postgres.hr
+gcli.sh tag remove --name catalog_postgres.hr
```
#### List all tags on an entity
```bash
-gcli tag list --name catalog_postgres.hr
+gcli.sh tag list --name catalog_postgres.hr
```
#### List the properties of a tag
```bash
-gcli tag properties --tag tagA
+gcli.sh tag properties --tag tagA
```
#### Set a properties of a tag
```bash
-gcli tag set --tag tagA --property test --value value
+gcli.sh tag set --tag tagA --property test --value value
```
#### Delete a property of a tag
```bash
-gcli tag remove --tag tagA --property test
+gcli.sh tag remove --tag tagA --property test
```
#### Rename a tag
```bash
-gcli tag update --tag tagA --rename newTag
+gcli.sh tag update --tag tagA --rename newTag
```
#### Update a tag's comment
```bash
-gcli tag update --tag tagA --comment "new comment"
+gcli.sh tag update --tag tagA --comment "new comment"
```
### Owner commands
@@ -697,19 +695,19 @@ gcli tag update --tag tagA --comment "new comment"
#### List an owner
```bash
-gcli catalog details --owner --name postgres
+gcli.sh catalog details --owner --name postgres
```
#### Set an owner to a user
```bash
-gcli catalog set --owner --user admin --name postgres
+gcli.sh catalog set --owner --user admin --name postgres
```
#### Set an owner to a group
```bash
-gcli catalog set --owner --group groupA --name postgres
+gcli.sh catalog set --owner --group groupA --name postgres
```
### Role commands
@@ -723,85 +721,85 @@ Note that some are only valid for certain entities.
#### Display role details
```bash
-gcli role details --role admin
+gcli.sh role details --role admin
```
#### List all roles
```bash
-gcli role list
+gcli.sh role list
```
#### Show a roles's audit information
```bash
-gcli role details --role admin --audit
+gcli.sh role details --role admin --audit
```
#### Create a role
```bash
-gcli role create --role admin
+gcli.sh role create --role admin
```
#### Delete a role
```bash
-gcli role delete --role admin
+gcli.sh role delete --role admin
```
#### Add a role to a user
```bash
-gcli user grant --user new_user --role admin
+gcli.sh user grant --user new_user --role admin
```
#### Remove a role from a user
```bash
-gcli user revoke --user new_user --role admin
+gcli.sh user revoke --user new_user --role admin
```
#### Remove all roles from a user
```bash
-gcli user revoke --user new_user --all
+gcli.sh user revoke --user new_user --all
```
#### Add a role to a group
```bash
-gcli group grant --group groupA --role admin
+gcli.sh group grant --group groupA --role admin
```
#### Remove a role from a group
```bash
-gcli group revoke --group groupA --role admin
+gcli.sh group revoke --group groupA --role admin
```
#### Remove all roles from a group
```bash
-gcli group revoke --group groupA --all
+gcli.sh group revoke --group groupA --all
```
### Grant a privilege
```bash
-gcli role grant --name catalog_postgres --role admin --privilege create_table modify_table
+gcli.sh role grant --name catalog_postgres --role admin --privilege create_table modify_table
```
### Revoke a privilege
```bash
-gcli role revoke --metalake metalake_demo --name catalog_postgres --role admin --privilege create_table modify_table
+gcli.sh role revoke --metalake metalake_demo --name catalog_postgres --role admin --privilege create_table modify_table
```
### Revoke all privileges
```bash
-gcli role revoke --metalake metalake_demo --name catalog_postgres --role admin --all
+gcli.sh role revoke --metalake metalake_demo --name catalog_postgres --role admin --all
```
### Topic commands
@@ -809,49 +807,49 @@ gcli role revoke --metalake metalake_demo --name catalog_postgres --role admin -
#### Display a topic's details
```bash
-gcli topic details --name kafka.default.topic3
+gcli.sh topic details --name kafka.default.topic3
```
#### Create a topic
```bash
-gcli topic create --name kafka.default.topic3
+gcli.sh topic create --name kafka.default.topic3
```
#### List all topics
```bash
-gcli topic list --name kafka.default
+gcli.sh topic list --name kafka.default
```
#### Delete a topic
```bash
-gcli topic delete --name kafka.default.topic3
+gcli.sh topic delete --name kafka.default.topic3
```
#### Change a topic's comment
```bash
-gcli topic update --name kafka.default.topic3 --comment new_comment
+gcli.sh topic update --name kafka.default.topic3 --comment new_comment
```
#### Display a topics's properties
```bash
-gcli topic properties --name kafka.default.topic3
+gcli.sh topic properties --name kafka.default.topic3
```
#### Set a topics's property
```bash
-gcli topic set --name kafka.default.topic3 --property test --value value
+gcli.sh topic set --name kafka.default.topic3 --property test --value value
```
#### Remove a topics's property
```bash
-gcli topic remove --name kafka.default.topic3 --property test
+gcli.sh topic remove --name kafka.default.topic3 --property test
```
### Fileset commands
@@ -859,55 +857,55 @@ gcli topic remove --name kafka.default.topic3 --property test
#### Create a fileset
```bash
-gcli fileset create --name hadoop.schema.fileset --properties managed=true,location=file:/tmp/root/schema/example
+gcli.sh fileset create --name hadoop.schema.fileset --properties managed=true,location=file:/tmp/root/schema/example
```
#### List filesets
```bash
-gcli fileset list --name hadoop.schema
+gcli.sh fileset list --name hadoop.schema
```
#### Display a fileset's details
```bash
-gcli fileset details --name hadoop.schema.fileset
+gcli.sh fileset details --name hadoop.schema.fileset
```
#### Delete a fileset
```bash
-gcli fileset delete --name hadoop.schema.fileset
+gcli.sh fileset delete --name hadoop.schema.fileset
```
#### Update a fileset's comment
```bash
-gcli fileset update --name hadoop.schema.fileset --comment new_comment
+gcli.sh fileset update --name hadoop.schema.fileset --comment new_comment
```
#### Rename a fileset
```bash
-gcli fileset update --name hadoop.schema.fileset --rename new_name
+gcli.sh fileset update --name hadoop.schema.fileset --rename new_name
```
#### Display a fileset's properties
```bash
-gcli fileset properties --name hadoop.schema.fileset
+gcli.sh fileset properties --name hadoop.schema.fileset
```
#### Set a fileset's property
```bash
-gcli fileset set --name hadoop.schema.fileset --property test --value value
+gcli.sh fileset set --name hadoop.schema.fileset --property test --value value
```
#### Remove a fileset's property
```bash
-gcli fileset remove --name hadoop.schema.fileset --property test
+gcli.sh fileset remove --name hadoop.schema.fileset --property test
```
### Column commands
@@ -919,53 +917,52 @@ null, boolean, byte, ubyte, short, ushort, integer, uinteger, long, ulong, float
In addition decimal(precision,scale), fixed(length), fixedchar(length) and varchar(length).
-
#### Show all columns
```bash
-gcli column list --name catalog_postgres.hr.departments
+gcli.sh column list --name catalog_postgres.hr.departments
```
#### Show column's audit information
```bash
-gcli column details --name catalog_postgres.hr.departments.name --audit
+gcli.sh column details --name catalog_postgres.hr.departments.name --audit
```
#### Show a column's audit information
```bash
-gcli column details --name catalog_postgres.hr.departments.name --audit
+gcli.sh column details --name catalog_postgres.hr.departments.name --audit
```
#### Add a column
```bash
-gcli column create --name catalog_postgres.hr.departments.value --datatype long
-gcli column create --name catalog_postgres.hr.departments.money --datatype "decimal(10,2)"
-gcli column create --name catalog_postgres.hr.departments.name --datatype "varchar(100)"
-gcli column create --name catalog_postgres.hr.departments.fullname --datatype "varchar(250)" --default "Fred Smith" --null=false
+gcli.sh column create --name catalog_postgres.hr.departments.value --datatype long
+gcli.sh column create --name catalog_postgres.hr.departments.money --datatype "decimal(10,2)"
+gcli.sh column create --name catalog_postgres.hr.departments.name --datatype "varchar(100)"
+gcli.sh column create --name catalog_postgres.hr.departments.fullname --datatype "varchar(250)" --default "Fred Smith" --null=false
```
#### Delete a column
```bash
-gcli column delete --name catalog_postgres.hr.departments.money
+gcli.sh column delete --name catalog_postgres.hr.departments.money
```
#### Update a column
```bash
-gcli column update --name catalog_postgres.hr.departments.value --rename values
-gcli column update --name catalog_postgres.hr.departments.values --datatype "varchar(500)"
-gcli column update --name catalog_postgres.hr.departments.values --position name
-gcli column update --name catalog_postgres.hr.departments.name --null true
+gcli.sh column update --name catalog_postgres.hr.departments.value --rename values
+gcli.sh column update --name catalog_postgres.hr.departments.values --datatype "varchar(500)"
+gcli.sh column update --name catalog_postgres.hr.departments.values --position name
+gcli.sh column update --name catalog_postgres.hr.departments.name --null true
```
#### Simple authentication
```bash
-gcli <normal command> --simple
+gcli.sh <normal command> --simple
```
### Authentication
@@ -973,7 +970,7 @@ gcli <normal command> --simple
#### Simple authentication with user name
```bash
-gcli <normal command> --simple --login userName
+gcli.sh <normal command> --simple --login userName
```
-<img src="https://analytics.apache.org/matomo.php?idsite=62&rec=1&bots=1&action_name=CLI" alt="" />
\ No newline at end of file
+<img src="https://analytics.apache.org/matomo.php?idsite=62&rec=1&bots=1&action_name=CLI" alt="" />