seaspray:/# /usr/bin/clickhouse-client --multiline
ClickHouse client version 19.1.6.
Connecting to localhost:9000.
Connected to ClickHouse server version 19.1.6 revision 54413.
seaspray :) SET date_time_input_format = 'best_effort';
SET date_time_input_format = 'best_effort'
Ok.
0 rows in set. Elapsed: 0.001 sec.
seaspray :) CREATE TABLE test_csv ( timestamp DateTime, id String ) ENGINE = MergeTree() PARTITION BY toHour(timestamp) ORDER BY timestamp SETTINGS index_granularity=8192;
CREATE TABLE test_csv
(
timestamp DateTime,
id String
)
ENGINE = MergeTree()
PARTITION BY toHour(timestamp)
ORDER BY timestamp
SETTINGS index_granularity = 8192
Ok.
0 rows in set. Elapsed: 0.002 sec.
seaspray :)
To load csv you have to pass it as a parameter to ch-cli.
clickhouse-client --help|grep date_time
Or set it in /etc/clickhouse-client/config.xml