# environment

The `environment` statement specifies the name of the environment to use for resolving [global variables](https://olddocs.exivity.io/data-pipelines/extract/var#global-variables).

## Syntax

**`environment`**` `*`name`*

## Details

The `environment` statement selects the predefined environment to use for [global variable](https://olddocs.exivity.io/data-pipelines/extract/var#global-variables) lookup. It is an error to specify the environment which is not defined in the global database.

If no environment is specified, the default environment (the one specified as *default* in the global database) is assumed.

{% hint style="info" %}
The environment can be changed many times without limitations, and the change affects only global variables that are referenced the first time within the script, e.g. all global variables, resolved (copied to local variables) retain their values.
{% endhint %}
