v.20.5New Feature

clickhouse-format tool enhances multi-query formatting with -n argument

The clickhouse-format tool is now able to format multiple queries when the -n argument is used. #10852 (Darío).
The clickhouse-format tool now supports formatting multiple queries in a single input when the -n argument is used.

Why it matters

This feature solves the problem of manually formatting multiple SQL queries individually by enabling batch formatting in clickhouse-format. It improves the developer experience by allowing efficient and consistent formatting of multi-query inputs.

How to use it

To format multiple queries, use the clickhouse-format tool with the -n argument. For example:

clickhouse-format -n < input.sql