Datalore 2024.4 Help

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.

  1. On the Home page, select the workspace to which yoy want to create an environment variable.

  2. 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.

  3. In the Environment variables menu, click the Add button in the upper right corner.

    Environment variables menu
  1. In the editor, open the Environment tool from the left-hand sidebar.

  2. In the Environment tool, switch to the Environment variables tab.

    Environment variables tab
  3. 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.

    1. Provide a name for the new environment variable.

    2. Provide a key name. This is what will be referenced in the notebook code.

    3. Provide a key value. This is the protected value that only you can manage.

    4. (Optional) Click Add key-value pair to provide another record.

    5. Click the Create variable button to finish your work in the dialog.

      Creating environment variable

    Keywords

    add environment variable, workspace environment variables

    Last modified: 11 July 2024