- Learning Pentaho Data Integration 8 CE(Third Edition)
- María Carina Roldán
- 182字
- 2025-04-04 17:49:50
Knowing the basics about Kettle variables
In this chapter, you used the string ${Internal.Entry.Current.Directory} to identify the folder where the current Job was saved. You also used the string ${MY_FOLDER} to define the name of the folder to be created. Both strings, ${Internal.Entry.Current.Directory} and ${MY_FOLDER}, are Kettle variables, that is, keywords linked to a value. You use the name of a variable, and when the Transformation runs, the name of the variable is replaced by its value.
The first of these two variables is an environment variable, and it is not the only one available. Other known environment variables are: ${user.home}, ${java.io.tmpdir}, and ${java.home}. All these variables, whose values are auto-populated by PDI, are ready to be used any time you need, both in jobs and transformations.
The second string, ${MY_FOLDER}, is a variable you defined in a Job directly in the entry that would use it, the Create a folder entry. That is not the only way to create user-defined variables. Another possibility is to use the kettle.properties file, as explained in the following subsection.