Create an environment variable
This procedure covers both basic cases of creating an environment variable:
For a notebook
You want to create an environment variable for a particular notebook you are working in right now. This will automatically attach the new environment variable to the notebook.
For a workspace
You add an environment variable to a workspace where you want to use it in multiple notebooks. The procedure does not attach the new environment variable to the notebooks. You attach it later when working in the editor.
In both cases, you will use Datalore's Create environment variable dialog, and the only difference between the two scenarios is accessing this interface.
Open the Create environment variable dialog
The procedure depends on whether you want to add a new environment variable to workspace resources or a specific notebook.
On the Home page, select the workspace to which yoy want to create an environment variable.
From the left-hand menu of the selected workspace, select Other and switch to the Environment variables tab. This will open the list of all workspace environment variables.
In the Environment variables menu, click the Add button in the upper right corner.
In the editor, open the Environment tool from the left-hand sidebar.
In the Environment tool, switch to the Environment variables tab.
Click the New variable button.
Configure a new environment variable
The procedure explains how to configure a new environment variable in the Create environment variable dialog.
Provide a name for the new environment variable.
Provide a key name. This is what will be referenced in the notebook code.
Provide a key value. This is the protected value that only you can manage.
(Optional) Click Add key-value pair to provide another record.
Click the Create variable button to finish your work in the dialog.
Keywords
add environment variable, workspace environment variables