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.
-
Click Account > Account Settings to open the Account Settings page.
-
Choose User environment variables from the list.
-
In the Environment variables section, add the following:
-
Name: Enter the variable name. For example,
YOUR_NAME_ENV_KEY
. -
Value: Enter a value for the variable. The maximum length for a value is 64K.
-
-
Click Set Variable.
You can send the values exactly as they are without adding escaping characters.
Every language reads environment variables uniquely.
-
In Python, it might look like this:
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")
-
Our Best Practices will guide you in setting up and maintaining your Domino environments.
-
Set up user environment variables for each user. The system injects these variables at execution time for any run initiated by that user.
-
Learn to build project variables to add, modify, or delete environment variables for your projects.
-
The Default Domino Variables glossary contains details about variables automatically injected by Domino.