v.24.11Improvement

Allow ClickHouse to Use File Argument with ch Command

Allow using clickhouse with a file argument as ch queries.sql. #71589 (Raúl Marín).
Allows executing ClickHouse client queries directly from a file by passing the file path as an argument, e.g., ch queries.sql.

Why it matters

This feature solves the inconvenience of manually piping or inputting SQL queries to the ClickHouse client by enabling users to run multiple queries stored in a file directly. It improves workflow efficiency and simplifies batch query execution.

How to use it

To use this feature, simply call the ClickHouse client with the path to your SQL file as the sole argument, for example:

ch queries.sql

where queries.sql contains your SQL statements.