Domino automatically injects the following environment variables whenever it runs your code, as part of the context of your run.
-
DOMINO_USER_API_KEY
— This variable is sunsetting; use the API Proxy for Domino API authentication instead. -
DOMINO_API_HOST
— Use this to use the Domino API to access another project. -
DOMINO_PROJECT_OWNER
— Username of the owner of the running project. -
DOMINO_PROJECT_NAME
— Name of the running project. -
DOMINO_RUN_ID
— Run ID of the current run. -
DOMINO_RUN_NUMBER
— Run number of the current run. -
DOMINO_HARDWARE_TIER_ID
- Hardware tier the current run is executing on (new in v1.42). -
DOMINO_STARTING_USERNAME
- Username of the user who began the run (new in v1.43). -
DOMINO_WORKING_DIR
- Working directory for the running project. -
AWS_SHARED_CREDENTIALS_FILE
- Path to your AWS credential file to connect to additional AWS resources (for example, S3, Redshift). See AWS credential propagation. -
DOMINO_TOKEN_FILE
- DOMINO_TOKEN_FILE no longer exists as an environment variable. Instead, Use a Token for Authentication.
You can use these to programmatically determine if your code is running in Domino or not. This is useful if your code might do something different when it runs locally as opposed to when it is runs on Domino.
These variables are also useful when you generate artifacts or outputs. For example, you might produce a report that refers to the run number.
The following are examples to retrieve an environment variable within your code:
Sys.getenv("DOMINO_RUN_ID")
If you want to define your own environment variables, see Secure Credential Storage.
In addition to the variables above, Domino sets some environment variables used to configure runs. They should not be defined as user or project-level environment variables. Here are some examples:
-
USER
-
DOMINO_*
(Any variable that starts withDOMINO
, e.g.,DOMINO_NODE
) -
LOGNAME
To avoid collisions with Domino environment variables, we recommend using a common prefix like GOOGLE_
for all custom environment variables. Failing to do so
may lead to unexpected behavior.