Datalore 2024.1 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 you want to add an environment variable.

  2. From the left-hand menu, select Environment variables. Here, you can view the environment variables created earlier.

    Environment variables list
  3. In the Environment variables view, click the Add variable button in the upper right corner.

    Databases view
  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
    Last modified: 09 April 2024