display-medicalKETTLE Variables

The kettle.properties file contains global variables for KETTLE.

circle-exclamation

Workshop - Kettle Variables


circle-info

Global Variables - kettle.properties

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.

KETTLE Variables
file-download
1KB

  1. Start Pentaho Data Integration.

circle-info
  1. Select Edit -> Edit the kettle.properties file

  2. Highlight the first row and right mouse click, and select the following option.

Global variables
  1. Add a DIR_SAMPLES variable for your OS.

Add this line:

  1. Save.

circle-info

Spoon loads kettle.properties on startup.

If variables do not show up, restart Spoon.

circle-info

You can also edit kettle.properties manually.

Default locations:

  • Windows: C:\Users\<username>\.kettle\kettle.properties

  • Linux/macOS: ~/.kettle/kettle.properties

The PowerShell script uses nanoarrow-up-right which was installed using scooparrow-up-right

  1. Open a terminal.

kettle.properties - Linux
circle-info

Verify in Spoon:

  1. Open any step property that shows the blue ${} icon.

  2. Press Ctrl+Space.

  3. Search for DIR_SAMPLES.

  4. Insert it into the field.

Global variable in Transformation

Last updated

Was this helpful?