domino logo
Get started with Python
Step 0: Orient yourself to DominoStep 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Get started with R
Step 0: Orient yourself to Domino (R Tutorial)Step 1: Create a projectStep 2: Configure your projectStep 3: Start a workspaceStep 4: Get your files and dataStep 5: Develop your modelStep 6: Clean up WorkspacesStep 7: Deploy your model
Domino Reference
Projects
Projects OverviewProjects PortfolioUpload Files to Domino using your BrowserFork and Merge ProjectsSearchSharing and CollaborationCompare File RevisionsArchive a Project
Advanced Project Settings
Project DependenciesProject TagsRename a ProjectSet up your Project to Ignore FilesUpload files larger than 550MBExporting Files as a Python or R PackageTransfer Project Ownership
Domino Runs
JobsDiagnostic Statistics with dominostats.jsonNotificationsResultsRun Comparison
Advanced Options for Domino Runs
Run StatesDomino Environment VariablesEnvironment Variables for Secure Credential StorageAccessing the shell for a Domino Run with SSHUse Apache Airflow with Domino
Scheduled Jobs
Domino Workspaces
WorkspacesUse Visual Studio Code in Domino WorkspacesPersist RStudio PreferencesAccess Multiple Hosted Applications in one Workspace Session
Customize the Domino Software Environment
Environment ManagementDomino Standard EnvironmentsInstall Packages and DependenciesAdd Workspace IDEs
Advanced Options for Domino Software Environment
Install Custom Packages in Domino with Git IntegrationAdd Custom DNS Servers to Your Domino EnvironmentConfigure a Compute Environment to User Private Cran/Conda/PyPi MirrorsScala notebooksUse TensorBoard in Jupyter WorkspacesUse MATLAB as a WorkspaceCreate a SAS Data Science Workspace Environment
Publish your Work
Publish a Model API
Model Publishing OverviewModel Invocation SettingsModel Access and CollaborationModel Deployment ConfigurationPromote Projects to Production
Publish a Web Application
App Publishing OverviewGet Started with DashGet Started with ShinyGet Started with Flask
Advanced Web Application Settings in Domino
App Scaling and PerformanceHost HTML Pages from DominoHow to Get the Domino Username of an App Viewer
Launchers
Launchers OverviewAdvanced Launcher Editor
Assets Portfolio Overview
Connect to your Data
Domino Datasets
Datasets OverviewDatasets Best PracticesAbout domino.yamlDatasets Advanced Mode TutorialDatasets Scratch SpacesConvert Legacy Data Sets to Domino Datasets
Data Sources OverviewConnect to Data Sources
Git and Domino
Git Repositories in DominoWork From a Commit ID in Git
Work with Data Best Practices
Work with Big Data in DominoWork with Lots of FilesMove Data Over a Network
Hadoop and Spark
Connect to a Cloudera CDH5 cluster from DominoConnect to a Hortonworks cluster from DominoConnect to a MapR cluster from DominoConnect to an Amazon EMR cluster from DominoHadoop and Spark overviewKerberos authenticationRun local Spark on a Domino executorUse PySpark in Jupyter Workspaces
Advanced User Configuration Settings
Two-factor authenticationUser API KeysOrganizations Overview
Use the Domino Command Line Interface (CLI)
Install the Domino Command Line (CLI)Domino CLI ReferenceDownload Files with the CLIForce-Restore a Local ProjectMove a Project Between Domino DeploymentsUse the Domino CLI Behind a Proxy
Browser Support
Get Help with Domino
Additional ResourcesGet Domino VersionContact Domino Technical Support
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Domino Reference
>
Domino Runs
>
Advanced Options for Domino Runs
>
Domino Environment Variables

Domino Environment Variables

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

If you’re looking to define your own environment variables, see Environment variables for secure credential storage.

Motivation

First, you can use these to programmatically determine if your code is running in Domino or not. This is useful in cases where your code might do something different when running locally vs running on Domino.

Second, these variables can be useful when generating artifacts or outputs, for example, a report you produce might refer to the run number.

Variables

Domino automatically injects the following variables:

  • DOMINO_USER_API_KEY — Useful if you want to use the Domino API to access another project

  • DOMINO_API_HOST — Useful if you want 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

Note

Usage

Here are some examples on retrieving an environment variable within your code:

R

Sys.getenv("DOMINO_RUN_ID")

Python

import os

os.environ['DOMINO_RUN_ID']

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