v.21.12Improvements

Enhancement: Execute Queries Before Entering Interactive Mode in Clickhouse

For clickhouse-local or clickhouse-client: if there is --interactive option with --query or --queries-file, then first execute them like in non-interactive and then start interactive mode. #30851 (Kseniia Sumarokova).
Added support for combined usage of --interactive with --query or --queries-file in clickhouse-local and clickhouse-client, enabling execution of queries before entering interactive mode.

Why it matters

This feature allows users to run specified queries non-interactively first and then continue using ClickHouse in interactive mode. It improves workflow flexibility by combining automated query execution with manual query exploration in a single session.

How to use it

Run clickhouse-local or clickhouse-client with the --interactive option together with either --query or --queries-file. The tool will execute the given queries first and then open the interactive prompt for further commands.