v.21.1New Features
Added queries-file parameter for clickhouse-client and clickhouse-local
Addedqueries-fileparameter forclickhouse-clientandclickhouse-local. #15930 (Maksim Kita).
Why it matters
This feature enables users to run multiple SQL queries from a file directly through theclickhouse-client or clickhouse-local interfaces, improving automation and scriptability by avoiding manual input or complex scripting to feed queries.How to use it
Use the--queries-file option followed by the path to a file containing SQL queries when starting clickhouse-client or clickhouse-local.Example:
clickhouse-client --queries-file=/path/to/queries.sqlThis will execute the queries sequentially from the specified file.