Skip to Content

Variable connection

Introduction

A Variable connection, created using the Variable connector, establishes access to either a project variable or an in-memory global variable. Once a connection is established, you can create instances of Variable activities associated with that connection to be used either as sources (to provide data in an operation) or as targets (to consume data in an operation).

For more information on using variables in scripts, transformations, and connection/activity configuration screens, see Variables.

Create or edit a Variable connection

A new Variable connection is created using the Variable connector from one of these locations:

An existing Variable connection can be edited from these locations:

Configure a Variable connection

Each user interface element of the Variable connection configuration screen is described below.

  • Connection name: Enter a name to use to identify the Variable connection. The name must be unique for each Variable connection and must not contain forward slashes (/) or colons (:). This name is also used to identify the Variable endpoint, which refers to both a specific connection and its activities.

  • Variable name: Select the global variable or project variable that the Variable endpoint accesses. You can select a variable that already exists in the project or create a new one.

    To select an existing variable, click the field to open a dropdown listing the global and project variables in the project. A G or P indicator before each name shows whether the variable is a global or project variable. Enter text in the field to filter the list, then click the variable you want to use.

    To create a new variable, click New variable at the bottom of the dropdown. Any text you already entered in the Variable name field is prefilled in the Name field. In the New variable dialog, select the type of variable to create:

    • Global variable: (Default.) Creates a global variable. Only Name is required.

    • Project variable: Creates a project variable. Name is required. The optional Hide value in UI, Default value, Label, and Description settings are also available. For details on these settings, see Configure a project variable individually in Project variables.

    Click Save to add the variable to the project and select it in the Variable name field, or Cancel to close the dialog without creating a variable.

    The selected variable name appears in the field as plain text. To remove the variable, click the remove icon, and then select or create another variable. To rename the selected variable, edit the name directly in the field. When you save the connection, a dialog asks whether to apply the new name everywhere the variable is used in the project (see Save below).

    Note

    Because a global variable exists in a project only while a component references it, a global variable created from this field is retained only if you save the connection while that variable is selected. Otherwise, it is removed from the project automatically.

    Variable names can be composed of these characters: letters (a-z, A-Z), numbers (0-9), periods, and underscores. If a name contains unsupported characters, a validation message lists the characters that are allowed. For naming conventions and other considerations, see Global variables and Project variables.

  • Save: Click to save and close the connection configuration. If you edited the name of the selected variable, a dialog asks you to choose where the new name should be applied:

    Dialog text

    Update global variable
    You may either update all usages of the variable in this project or only in this endpoint.

    • Update all usages in this project
    • Update only this endpoint
    • Cancel
    • Update all usages in this project: Click to rename the variable that the endpoint accesses and also rename every other usage of that variable in the project.

    • Update only this endpoint: Click to rename the variable that the endpoint accesses and leave any other usages of that variable in the project unchanged.

    • Cancel: Click for no changes to be made and to return to the Variable connection configuration.

  • Discard changes: After making changes to a new or existing configuration, click to close the configuration without saving. A dialog asks you to confirm that you want to discard changes.

  • Delete: After opening an existing connection configuration, click to permanently delete the connection from the project and close the configuration (see Component dependencies, deletion, and removal). A dialog asks you to confirm that you want to delete the connection.

Next steps

Menu actions for a connection and its activity types are accessible from the project pane and design component palette. For details, see Actions menus in Connector basics.

After configuring a Variable connection, you can configure one or more Variable activities associated with that connection to be used either as a source to provide data to an operation or as a target to consume data in an operation.

Configure activities

These activity types are available:

  • Read: Reads data from a Variable endpoint and is intended to be used as a source in an operation.

  • Write: Writes data to a Variable endpoint and is intended to be used as a target in an operation.