domino logo
4.5
  • Tech Ecosystem
  • Get Started
  • Domino Cloud
  • Collaborate
  • Projects
  • Work with Data
  • Workspaces
  • Environments
  • Executions
  • Deploy Models and Apps
  • Organizations
  • Security and Credentials
  • Notifications
  • Search
  • Domino CLI
  • Troubleshooting
  • Get Help
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Executions
>
Domino Environment Variables

Domino Environment Variables

Domino automatically injects the following environment variables whenever it runs your code, as part of the context of your run.

  • DOMINO_USER_API_KEY — Use this to use the Domino API to access another project.

  • 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 - Path to a JWT token signed by Domino to authenticate with the Domino API or other third-party services. Use a Token for Authentication.

Note

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.

Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.