Skip to content

Commit

Permalink
Update CLI examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiimk committed Dec 30, 2024
1 parent 6da3120 commit acb7458
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 deletions.
23 changes: 21 additions & 2 deletions resources/cli-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ Executes an SQL query or drops you into an SQL shell

**Subcommands:**

* `server`Run SQL server
* `server`Runs an SQL engine in a server mode

**Options:**

Expand Down Expand Up @@ -1149,7 +1149,7 @@ Note: Currently when connecting to a remote SQL kamu server you will need to man

## `kamu sql server`

Run SQL server
Runs an SQL engine in a server mode

**Usage:** `kamu sql server [OPTIONS]`

Expand All @@ -1163,6 +1163,25 @@ Run SQL server

* `--livy` — Run Livy server instead of JDBC

**Examples:**

By default runs the DataFusion engine exposing the FlightSQL protocol:

kamu sql server

To customize interface and port:

kamu sql server --address 0.0.0.0 --port 50050

To run with Spark engine:

kamu sql server --engine spark

By default Spark runs with JDBC protocol, to instead run with Livy HTTP gateway:

kamu sql server --engine spark --livy




## `kamu system`
Expand Down
21 changes: 20 additions & 1 deletion src/app/cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1291,8 +1291,27 @@ pub enum SqlSubCommand {
Server(SqlServer),
}

/// Run SQL server
/// Runs an SQL engine in a server mode
#[derive(Debug, clap::Args)]
#[command(after_help = r#"
**Examples:**
By default runs the DataFusion engine exposing the FlightSQL protocol:
kamu sql server
To customize interface and port:
kamu sql server --address 0.0.0.0 --port 50050
To run with Spark engine:
kamu sql server --engine spark
By default Spark runs with JDBC protocol, to instead run with Livy HTTP gateway:
kamu sql server --engine spark --livy
"#)]
pub struct SqlServer {
/// Expose server on specific network interface
#[arg(long)]
Expand Down

0 comments on commit acb7458

Please sign in to comment.