mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-26 17:41:59 +00:00
Improve gRPC client example
This commit is contained in:
parent
aa3c3c545e
commit
2c30b5febb
@ -84,8 +84,8 @@ In the following example a table is created and loaded with data from a CSV file
|
|||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
./clickhouse-grpc-client.py -q "CREATE TABLE grpc_example_table (id UInt32, text String) ENGINE = MergeTree() ORDER BY id;"
|
./clickhouse-grpc-client.py -q "CREATE TABLE grpc_example_table (id UInt32, text String) ENGINE = MergeTree() ORDER BY id;"
|
||||||
echo "0,Input data for" > a.txt ; echo "1,gRPC protocol example" >> a.txt
|
echo -e "0,Input data for\n1,gRPC protocol example" > a.csv
|
||||||
cat a.txt | ./clickhouse-grpc-client.py -q "INSERT INTO grpc_example_table FORMAT CSV"
|
cat a.csv | ./clickhouse-grpc-client.py -q "INSERT INTO grpc_example_table FORMAT CSV"
|
||||||
|
|
||||||
./clickhouse-grpc-client.py --format PrettyCompact -q "SELECT * FROM grpc_example_table;"
|
./clickhouse-grpc-client.py --format PrettyCompact -q "SELECT * FROM grpc_example_table;"
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user