Variables

Add flexibility / portability with variables ..

PDI variables can be defined in several ways, and with the different scope. You already know about predefined variables and variables defined in the kettle.properties file, but there are more options.

PDI variables can be used in both transformation steps and job entries. You define variables with the Set Variable step and Set Session Variables step in a transformation, manually in the kettle.properties file, or through the Set Environment Variables dialog box in the Edit menu.

  • ${VARIABLE}

  • %%VARIABLE%%

Predefined variables are Kettle variables mainly related to the environment in which PDI is running. These variables are ready to be used both in Jobs and Transformations and their scope is the Java Virtual Machine (JVM).

The following table lists some of the most used predefined variables:

Predefined Internal VariableDescription

Internal.Job.Filename.Directory

The directory where the job file is located.

Internal.Job.Filename.Name

The name of the job file.

Internal.Entry.Current.Directory

The directory where the current entry is located.

Internal.Transformation.Repository.Directory

If you're running a transformation for the Repository, this variable will display the path.

Internal.Cluster.Size

The number of Salves in the cluster.

Internal.Step.Name

name of executing step.

Predefined KETTLE VariablesDescription

KETTLE_HOME

Location of kettle.properties file.

Predefined JRE VariablesDescription

java.version

JRE runtime version

os.name

Name of OS

os.version

OS version

user.name

User account name

user.home

User home directory

To access the predefined variables, click: CTL + SPACEBAR

Last updated