Clickhouse: Support for SQL scripts in clickhouse-client

Created on 24 Feb 2019  路  3Comments  路  Source: ClickHouse/ClickHouse

It is very common use case to run a series of sql queries stored in a SQL script. Currently client doesn't seems to support that. Thus this request.
Ideally the API something like

clickhouse-client script.sql

I am aware of running client for each query separately and multiline parameter.

comp-cli easy task feature help wanted

Most helpful comment

cat script.sql | clickhouse-client -mn

cat qq.sh

!/bin/bash

cat $1| clickhouse-client -mn

All 3 comments

cat script.sql | clickhouse-client -mn

cat qq.sh

!/bin/bash

cat $1| clickhouse-client -mn

Thanks again, will leave that open as I think it is still worth to support script files and not just piping them it. Feel free to close if there are no plans to incorporate that.

clickhouse-client --multiquery < script.sql

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jangorecki picture jangorecki  路  3Comments

zhicwu picture zhicwu  路  3Comments

SaltTan picture SaltTan  路  3Comments

vvp83 picture vvp83  路  3Comments

bseng picture bseng  路  3Comments