clc sql
Executes a SQL statement.
Usage:
clc sql [query] [flags]
Parameters:
Parameter | Required | Description | Default |
---|---|---|---|
|
Optional |
Output format. Supported formats:
|
|
Global parameters
Parameter | Description | Default |
---|---|---|
|
Path to the configuration file in YAML format. |
The following locations are tried in order for the existence of
|
|
Set the output format
|
|
|
Set the log level, one of:
|
|
|
Set the log path. Use |
|
|
Prevent displaying unnecessary output. |
|
|
Enable output with more information. |
|
Querying with SQL using the Hazelcast CLC
You can run SQL queries in both interactive and non-interactive mode of the Hazelcast CLC.
$ clc sql -c prod "SELECT * from cities"
1 United Kingdom London 9540576
4 United States Los Angeles 3985520
5 Turkey Ankara 5309690
7 Brazil Sao Paulo 22429800
clc
CLC> SELECT * FROM cities
---------------------------------------------------------------------------------
__key | country | city | population
---------------------------------------------------------------------------------
1 | United Kingdom | London | 9540576
4 | United States | Los Angeles | 3985520
5 | Turkey | Ankara | 5309690
7 | Brazil | Sao Paulo | 22429800
---------------------------------------------------------------------------------