KETTLE Variables
The kettle.properties file contains global variables for KETTLE.



Last updated
Was this helpful?
The kettle.properties file contains global variables for KETTLE.
Use variables to avoid hardcoded paths and values.
Use kettle.properties to store global variables for Spoon.
In this workshop, you will create a global variable. You will then use it in a transformation.
What You'll Accomplish:
Access and edit the kettle.properties configuration file
Define a global variable for jobs and transformations
Use both variable formats (${VAR} and %%VAR%%)
Insert variables with Ctrl+Space
Prerequisites: Pentaho Data Integration installed and configured
Estimated Time: 10 minutes
Variables can be used throughout Pentaho Data Integration, including in transformation steps and job entries. You define variables by setting them with the Set Variable step in a transformation or by setting them in the kettle.properties file in the directory.
Use variables by either retrieving them with the Get Variable step or by using metadata strings like:
${VARIABLE}
%%VARIABLE%%
You can mix both formats. The first is Unix-style. The second is Windows-style.
Fields that support variables show the blue ${} icon.
Press Ctrl+Space to insert a variable in those fields. Hover over the icon to see help.
Start Pentaho Data Integration.
Select Edit -> Edit the kettle.properties file
Highlight the first row and right mouse click, and select the following option.

Add a DIR_SAMPLES variable for your OS.
Add this line:
Add this line:
Save.
Spoon loads kettle.properties on startup.
If variables do not show up, restart Spoon.
Open a terminal.

Verify in Spoon:
Open any step property that shows the blue ${} icon.
Press Ctrl+Space.
Search for DIR_SAMPLES.
Insert it into the field.

Last updated
Was this helpful?
Was this helpful?
Set-Location C:\Pentaho\design-tools\data-integration
.\spoon.batcd ~/Pentaho/design-tools/data-integration
./spoon.shDIR_SAMPLES=C:/TempDIR_SAMPLES=/home/pentaho/Tempcd \
cd Workshop--Data-Integration\Scripts
.\edit-kettle.properties.ps1cd
cd ~/.kettle
nano kettle.properties