Variables

Variables can be used in any expression (SQL or others), as well as within the metadata of the repository. A variable is resolved when the command containing it is executed by the agent or the graphical interface.

The properties of the variable are displayed on the Definition and Refresh tabs in the Variable window of the Designer module. The global variables are located in the tree on the same level as the projects, while the project variables are located within their project.

Definition

Properties

Description

Name

Name of the variable, in the form it will be used. This name should not contain characters that could be interpreted as word separators (blanks, etc) by the technologies the variable will be used on. Variable names are case-sensitive. That is, "YEAR" and "year" are considered to be two different variables.

Variable scope

The validity range of the variable, either "Global" or "Project". A variable can be valid for all projects (a global variable), or for the current project only. Oracle Data Integrator examines "Project"-level variables first before evaluating "Global"-level variables. Thus, if a variable YEAR exists at both project level and global level, only the project-level value can be evaluated.

Description

Detailed description of the variable

Datatype

Type of variable: Alphanumeric (255 characters), Date, Numeric (Maximum 10 digits) or Text (unlimited length).

Action

This parameter shows the length of time the value of a variable is kept for:

  • Non-persistent: The value of the variable is kept in memory for a whole session.

  • Last value: Oracle Data Integrator stores in its repository the latest value held by the variable.

  • Historize: Oracle Data Integrator keeps and history of all the values held by this variable.

Default Value

The value assigned to the variable by default.

Refresh

Refresh a variable allows a new value based on the result of an SQL-type query to be assigned to it. All expressions using this variable will subsequently be executed with the new value until a new refresh is done.

Properties

Description

Schema

Logical schema, for identifying the connection on which the SQL query will be executed.

Select query

Select-type SQL query or any command (execution of a stored procedure) allowing a result array (Resultset) to be returned for a row and a column.

For example: Select max(order_no) from crm.order

Caution: Table names should be specified in full (catalog, schema, etc), as connection parameters do not allow positioning on the right physical schema.

Refresh

Click on the refresh button to calculate the last value of the variable while executing the query entered above. A window is displayed for entering the context and the execution agent. You check the execution in the log.

Note: If this variable is not persistent, you will not be able to display the value calculated.

History

This window displays the history of the values of the variable with the context for variables with the "log" action, or the last value for a variable with the "last value" action.

Note: Each value is attached to the context in which the session was executed.

Scenarios

This tab displays in a table view the scenarios generated for this component, as well as their schedules. You may double-click a scenario or a schedule to display its properties.

It is possible to create and delete scenarios by clicking the   Generate and Delete buttons.

The popup menus for scenarios and schedules are also available from this tab.

Note: Scenarios generated for variables contain a single step performing a refresh operation for the variable.