Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Variable vs Parameter

  1. #1
    Join Date
    Jun 2010

    Default Variable vs Parameter


    Not sure if this has been asked before - I am a bit confused on the differences between variables and parameters in Pentaho. I know that parameters become variables in our jobs, but really my question would be what are the benefits of having parameters compared to setting variables?

    In my context, I am designing a number of reusable pentaho jobs. I would really like to use parameters to have the callers of my job pass these fixed parameters in. However, at the same time, I am also having trouble understanding the main differences between:
    1) Callers setting variables in pentaho prior to calling my job
    2) Callers setting variables in pentaho, and before calling my job, define what are the parameters to pass into my job.

    Would appreciate if anyone could help to clarify on this. Thanks.


  2. #2


    Hi yewchong,

    Well in short, a variable value can only be set within the Pentaho Job as for a parameter, you can set it at run time.

    For example, I can set my data_home variable to where I want all files to be extracted from the command line:

    ./ *** bunch of kitchen related params *** -param: DATA_HOME=${PDI_HOME}/psldw/stg -param:TEMP_DIR=${PDI_HOME}/psldw/stg/tmp

    I use parameters heavily in all our mappings as it allows me to change the behavior of my mapping without having to open it within the tool, making the change and then saving it.

  3. #3
    Join Date
    Apr 2008


    Variables are also used when you are looping - for example processing every table in a database.
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.