11.1 Create a Variable

A variable is an object that stores a single value, which can be a string, a number or a date. You can specify the value of the variables when you create the variable or set the value using a query expression.

The Variables page lists all the existing variables. Click the Actions icon (Actions icon) of a variable to edit, refresh, or delete it. All the available variables are also listed in the left panel of the Workflow Details page. You can use variables as steps in data flows and workflows.

To create a variable:

  1. On the Home page, click the required Project title. You are navigated to the Project Details page.
  2. In the left pane, click Variables. The Create Variable page appears.
  3. Enter a name for the variable.
  4. From the Data Type drop down, select one of the following:
    • Short text - The value can be alphanumeric, can contain special characters, and cannot exceed 255 characters.
    • Long text - The value can be alphanumeric, can contain special characters, and cannot exceed 64000 characters.
    • Numeric - The value can be a numeric value and can be preceded by a minus (-) sign. The value cannot exceed 10 digits. Possible value range is -999999999 to 9999999999.
    • Date - The value is a date format.
  5. In the Default Value field enter the value you want to assign to the variable. The allowed value depends on the Data Type you select.
  6. For variables that you modify, you can click the Actions menu next to the variable to open the Refresh Variable page to update the value. From the Keep History drop down select how you want the variable value to be displayed in the Refresh Variable page:
    • All Values - You can see the history of all the values held by this variable.
    • Latest Value - You can see only the latest value specified for the variable.
    • No History - Data Transforms does not keep the history of the values held by this variable.
    • Secure Value - This is useful when the variable contains passwords or other sensitive data. The value is not displayed in the Refresh Variable page.
  7. Enter a description for the variable.
  8. If you want the variable value to be set by a query, click the Refresh tab. Select the connection type and schema where you want to execute the command. Enter the query and click Validate to check the syntax of your expression.
  9. Click Save.

    The newly created variable is listed in the Variables page as well as in the Variables node in the left panel of the Workflow Details page.