Overview
Basic Concepts
Cluster Architecture
Strengths
Use Cases
cat <data_file> | ./clickhouse-client --host=<host> --port=<port> --user=<username> --password=<password> --query="INSERT INTO <table_name> FORMAT <format>";--multiquery parameter, which is useful in most cases except for INSERT requests. The query results are output continuously without delimiters. Similarly, to execute large-scale queries, start a ClickHouse client for each query. Note that each startup takes tens of milliseconds.test.csv.test.csv and write the following data.$ cat /test.csv1,2,33,2,178,43,45
CREATE TABLE test.test on cluster default_cluster(`column1` UInt32,`column2` UInt32,`column3` UInt32)engine = MergeTree()order by column1;
create table test.test on cluster default_cluster(`column1` UInt32,`column2` UInt32,`column3` UInt32)engine = ReplicatedMergeTree('/clickhouse/tables/test/test/{shard}', '{replica}')order by column1;
create table test.test_dis on cluster defaultAS test.testengine = Distributed('default_cluster', 'test', 'test', rand());
cat data.csv | clickhouse-client --query="INSERT INTO test FORMAT CSV"
select * from test;
Was this page helpful?
You can also Contact sales or Submit a Ticket for help.
Help us improve! Rate your documentation experience in 5 mins.
Feedback