/
JethroClient
JethroClient
JethroClient is a SQL command-line interface (CLI) offered by (and for) JethroServer. To run it, use the following command:
JethroClient instance_name connection_string -p password {options}
Connection String
The connection string is a list of one or more JethroServer network addresses, specified as host:port pairs. When specifying multiple JethroServer network addresses, they need to be separated by a semi-colon - and the entire connection string needs to be quoted (Specifying multiple addresses automatically enables client-side load balancing).
For example:
JethroClient demo localhost:9111 -p jethro
Or, if connecting to more than one host:
JethroClient demo "10.0.0.77:9111;10.0.0.88:9111" -p jethro
Command options
Option | Description |
---|---|
-i <file> | Execute all SQL queries provided in an input file (SQL delimiter is ;) |
-o <file> | Stores all output results into a specified file |
-q <query> | Execute a provided text query and exit |
-u <user> | User name (if not provided, user 'jethro' is assumed) |
-p <password> | Password |
-c | Switch to CSV output mode |
-d <char> | For CSV mode, change the columns delimiter to a specified character (Default is <,>) |
--quiet | Suppress all informational messages |
--no_header | Don't print result set header |
Examples
JethroClient myinstance 127.0.0.1:9111 -u myuser -p mypass --quiet --no_header -q "select now();"
JethroClient demo localhost:9112 -p jethro -i db_test.sql -c -d '|' > db_test.csv
JethroClient demo localhost:9112 -p jethro -i db_test.sql -c -d '|' -o db_test.csv
, multiple selections available,
Related content
JethroClient
JethroClient
More like this
JDBC Driver
JDBC Driver
More like this
JDBC Driver
JDBC Driver
More like this
JDBC Driver
JDBC Driver
More like this
Connecting to Jethro Instances
Connecting to Jethro Instances
More like this
Managing Jethro
Managing Jethro
More like this