Skip to content

Commit 477b0ed

Browse files
authored
SQL: specify command to run the CLI on a remote machine without Elasticsearch (#52626)
1 parent fed6799 commit 477b0ed

File tree

1 file changed

+23
-4
lines changed

1 file changed

+23
-4
lines changed

docs/reference/sql/endpoints/cli.asciidoc

+23-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ Elasticsearch ships with a script to run the SQL CLI in its `bin` directory:
1010
$ ./bin/elasticsearch-sql-cli
1111
--------------------------------------------------
1212

13-
The jar containing the SQL CLI is a stand alone Java application and
14-
the scripts just launch it. You can move it around to other machines
15-
without having to install Elasticsearch on them.
16-
1713
You can pass the URL of the Elasticsearch instance to connect to as
1814
the first parameter:
1915

@@ -47,3 +43,26 @@ James S.A. Corey |Leviathan Wakes |561 |1306972800000
4743
--------------------------------------------------
4844
// TODO it'd be lovely to be able to assert that this is correct but
4945
// that is probably more work then it is worth right now.
46+
47+
The jar containing the SQL CLI is a stand alone Java application and
48+
the scripts just launch it. You can move it around to other machines
49+
without having to install Elasticsearch on them. Without the already
50+
provided script files, you can use a command similar to the following
51+
to start the SQL CLI:
52+
53+
[source,bash]
54+
--------------------------------------------------
55+
$ ./java -jar [PATH_TO_CLI_JAR]/elasticsearch-sql-cli-[VERSION].jar https://some.server:9200
56+
--------------------------------------------------
57+
58+
or
59+
60+
[source,bash]
61+
--------------------------------------------------
62+
$ ./java -cp [PATH_TO_CLI_JAR]/elasticsearch-sql-cli-[VERSION].jar org.elasticsearch.xpack.sql.cli.Cli https://some.server:9200
63+
--------------------------------------------------
64+
65+
The jar name will be different for each Elasticsearch version (for example `elasticsearch-sql-cli-7.3.2.jar`),
66+
thus the generic `VERSION` specified in the example above. Furthermore,
67+
if not running the command from the folder where the SQL CLI jar resides,
68+
you'd have to provide the full path, as well.

0 commit comments

Comments
 (0)