v.21.11Improvements
clickhouse-format now supports --query option
clickhouse-format now supports option --query. In previous versions you have to pass the query to stdin. #29325 (凌涛).Why it matters
Previously, users had to provide the SQL query toclickhouse-format via standard input (stdin), which was less convenient for scripting and quick formatting. This feature improves usability by allowing queries to be formatted directly from the command line, enhancing workflow efficiency.How to use it
Use the--query option followed by the SQL query string to format a query directly. For example:clickhouse-format --query "SELECT * FROM table WHERE id = 1"