v.18.5Improvement

Use from_env Attribute to Set Config Values from Environment Variables

Now you can use the from_env #2741 attribute to set values in config files from environment variables.
Added the from_env attribute to ClickHouse configuration files to allow setting configuration values directly from environment variables.

Why it matters

This feature enables dynamic configuration of ClickHouse instances based on environment variables, solving the challenge of managing configurations in containerized or cloud environments where environment variables are commonly used for configuration management.

How to use it

In your ClickHouse configuration file, use the from_env attribute to specify the environment variable name whose value should be used for the configuration setting. For example:

<some_setting from_env="ENV_VAR_NAME" />

This tells ClickHouse to read the value of ENV_VAR_NAME from the environment and use it for some_setting.