# Dynamic Environment

This page keeps the environment-variable substitution overview and example configuration on a single page.

To load environment variables into the configuration you can use the `dynamic.env.config` property key to list all the property names that will need templating at run time. Pinot will lookup the in the environment for the variable specified as value and insert the contents in the configuration.

{% hint style="info" %}
\`dynamic.env.config\` is a property that refers to the configuration it's defined in. If you have multiple configuration files make sure to define it in each one of them listing the all the properties that need templating in that specific file.
{% endhint %}

## Example

Following an example where we first load some variables in the ENV and then we specify in the config what needs to be templated and with which variable.

```shell
export PINOT_CONTROLLER_HOST=host
export PINOT_SERVER_PROPERTY=property
export ANOTHER_VARIABLE=random
```

#### Config from CLI or Config Path

```properties
dynamic.env.config=pinot.controller.host,pinot.server.property,other.var
pinot.controller.host=PINOT_CONTROLLER_HOST
pinot.server.property=PINOT_SERVER_PROPERTY
other.var=ANOTHER_VARIABLE
```

#### Final result (in memory)

```properties
dynamic.env.config=pinot.controller.host,pinot.server.property,other.var
pinot.controller.host=host
pinot.server.property=property
other.var=random
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pinot.apache.org/reference/configuration-reference/dynamic-environment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
