User Environment Variables

In Domino, you can create, update, or delete your private environment variables. These variables are stored securely in Vault and only you can see them. The system injects these variables at execution time for any run initiated by you.

User environment variables are automatically imported into runs for all projects. However, user-specific environment variables cannot be used in models.

Set user environment variables
  1. Click Account > Account Settings to open the Account Settings page.

  2. Choose User environment variables from the list.

  3. In the Environment variables section, add the following:

    1. Name: Enter the variable name. For example, YOUR_NAME_ENV_KEY.

    2. Value: Enter a value for the variable. The maximum length for a value is 64K.

  4. Click Set Variable.

You can send the values exactly as they are without adding escaping characters.

Access Environment variables

Every language reads environment variables uniquely.

import os
s3 = S3Client(os.environ['S3_KEY'], os.environ['S3_SECRET'])

Run this to retrieve an environment variable within your code for Python:

import os
os.environ['DOMINO_RUN_ID']
  • In R, it might look like this:

makeS3Client(Sys.getenv("S3_KEY"), Sys.getenv("S3_SECRET"))

Run this to retrieve an environment variable within your code for R:

Sys.getenv("DOMINO_RUN_ID")

Next steps