2016-02-07 09:53:48 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
clickhouse-client --query="DROP TABLE IF EXISTS test.csv";
|
|
|
|
clickhouse-client --query="CREATE TABLE test.csv (s String, n UInt64, d Date) ENGINE = Memory";
|
|
|
|
|
|
|
|
echo '"Hello, world", 123, "2016-01-01"
|
2016-02-07 10:23:02 +00:00
|
|
|
"Hello, ""world""", "456", 2016-01-02,
|
2016-02-07 09:53:48 +00:00
|
|
|
Hello "world", 789 ,2016-01-03
|
|
|
|
"Hello
|
2016-02-07 10:23:02 +00:00
|
|
|
world", 100, 2016-01-04,' | clickhouse-client --query="INSERT INTO test.csv FORMAT CSV";
|
2016-02-07 09:53:48 +00:00
|
|
|
|
|
|
|
clickhouse-client --query="SELECT * FROM test.csv ORDER BY d";
|
|
|
|
clickhouse-client --query="DROP TABLE test.csv";
|