v.21.8Improvement

Support for Multiple Includes in Configuration

Support for multiple includes in configuration. It is possible to include users configuration, remote server configuration from multiple sources. Simply place <include /> element with from_zk, from_env or incl attribute, and it will be replaced with the substitution. #24404 (nvartolomei).
Added support for multiple includes in ClickHouse configuration, allowing users to include configuration fragments from various sources such as ZooKeeper, environment variables, or local files.

Why it matters

This feature enables more flexible and modular configuration management by allowing users to split and organize configurations into multiple parts. It simplifies maintaining large or complex setups by supporting inclusion from multiple sources, improving clarity and reusability.

How to use it

Place the <include /> element in your configuration files with one of the attributes: from_zk, from_env, or incl. Each attribute specifies the source of the included configuration snippet. For example:

<include from_zk="path/in/zookeeper" />
<include from_env="ENV_VAR_NAME" />
<include incl="path/to/local/file.xml" />