Skip to main content
Pentaho Documentation

Set Kettle Variables

Overview

Explains how to set kettle properties.

Kettle variables configure various PDI-specific options such as the location of the shared object file for transformations and jobs or the log size limit.  You can set Kettle variables using two methods.

  • Set Kettle Variables in Spoon
  • Set Kettle Variables Manually

If you are running a Pentaho MapReduce job, you can also set Kettle and environment variables in the Pentaho MapReduce job entry.

Set Kettle Variables in Spoon

To set Kettle variables in Spoon, complete these steps.

  1. In Spoon, select Edit > Edit the kettle.properties file.
  2. In the Kettle Properties window, modify the variable value. 
  3. If you want to add a variable, complete these steps.
    1. Right-click on a line number, then select Insert before this row or Insert after this row
    2. Enter the variable name and value.
    3. If you want to reposition the variable, right-click on the row number again, then select Move Up or Move Down.
  4. Click the OK button.

Set Kettle Variables Manually

To edit Kettle variables manually, complete these steps.

  1. Open the kettle.properties file in a text editor.  By default, the kettle.properties file is typically stored in your home directory or the .pentaho directory.
  2. Edit the file.
  3. When complete, close and save the file.

Set Kettle or Java Environment Variables in the Pentaho MapReduce Job Entry

Pentaho MapReduce jobs are typically run in distributed fashion, with the mapper, combiner, and reducer run on different nodes.  If you need to set a Java or Kettle environment variable for the different nodes, such as the KETTLE_MAX_JOB_TRACKER_SIZE, set them in the Pentaho MapReduce job entry window.

Values for Kettle environment variables set in the Pentaho MapReduce window override the Kettle environment variable values in the kettle.properties file.  To view the list of variable names, descriptions, see the Set Kettle Variables in Spoon section of  this document.

To set kettle or java environment variables, complete these steps.

  1. In Spoon, double-click the Pentaho MapReduce job entry, then click the User Defined tab.
  2. In the Name field, set the environment or Kettle variable you need.
    For Kettle environment variables, type the name of the variable in the Name field, like this: KETTLE_SAMPLE_VAR.
    For Java environment variables, preface the value with the java.system. prefix, like this:  java.system.SAMPLE_PATH_VAR.
  3. Enter the value of the variable in the Value field.
  4. Click the OK button.