The Wiki will be offline Monday, November 20, for upgrade between 10:00am ET and 5:00pm ET.
Hitachi Vantara Pentaho Community Wiki
Access Keys:
Skip to content (Access Key - 0)

Expose the contents of a .properties file as variables

Abstract: Managing job configuration typically involves an initial phase where you set a bunch of configuration settings as variables so these can be referenced by subsequent jobs and transformations. Use this job to load the contents of a .properties (or .ini) file abd set them as variables.

Authors: Roland Bouman

License: LGPL

Kettle versions: 3.2 and up (perhaps earlier versions too)


  • set-variables.ktr - A transformation that loads the properties in a file in a directory specified by the variable $
    Unknown macro: {CONFIG_DIR}

    and sets a variable for each key/value pair in the properties file.


    Often you need to run a reusable job against multiple environments or in different conditions. For example, the same job needs to run in a development environment, a test environment and a production environment. You can conveniently manage the configurations for these different contexts in a .properties or .ini file, and have an initial transformation that reads the properties and sets corresponding kettle variables so any subsequent jobs and transformations can access the configuration through variable references.

    This transformation can be run as such an initial transformation in the main job of a ETL process. The transformation assumes a $

    variables (typically set by the caller of the main job through a kettle parameter) that points to the location where a file can be found. The transformation will read the key/value pairs from the file and will create a variable that having the key as name and the value as its value.

See also:

This documentation is maintained by the Pentaho community, and members are encouraged to create new pages in the appropriate spaces, or edit existing pages that need to be corrected or updated.

Please do not leave comments on Wiki pages asking for help. They will be deleted. Use the forums instead.

Adaptavist Theme Builder (4.2.0) Powered by Atlassian Confluence 3.3.3, the Enterprise Wiki