Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Using Named Parameters as Variables

  1. #1
    Join Date
    May 2015
    Posts
    9

    Default Using Named Parameters as Variables

    Hi,My understanding is that named parameters can be used in much the same way as variables throughout your transformation/job. I'm aware of the distinction between defining variables (via set variables step or kettle.properties) vs. defining named parameters (via job/transformation settings dialog) but I was under the impression that they could then be referenced in much the same way.In my particular case, I'm defining a named parameter in a parent job, and then trying to access it in a child transformation using a table input step where I dereference it with the usual syntax: ${}. I'm certain this is correct usage but it seems that the named parameter is not visible for some reason. I've ticked the box to pass it down to the sub-job/transformation but still no joy. No doubt this is an obvious oversight / misunderstanding on their usage on my part so I'd appreciate some assistance.Thanks

  2. #2
    Join Date
    May 2014
    Posts
    358

    Default

    Did you define the parameter in the transformation properties dialog?

  3. #3
    Join Date
    May 2015
    Posts
    9

    Default

    Quote Originally Posted by Lukfi View Post
    Did you define the parameter in the transformation properties dialog?
    Yes, I've tried the following procedure:

    To define the parameter using the parameters tab on both a job entry and transformation dialog box. I've also ticked the box to pass all parameters down to the sub-job/transformation. Further, I've even added the parameter to the child transformation to pass it down to its grandchild. Any ideas?

  4. #4
    Join Date
    May 2015
    Posts
    9

    Default

    Quote Originally Posted by AJR View Post
    Yes, I've tried the following procedure:

    To define the parameter using the parameters tab on both a job entry and transformation dialog box. I've also ticked the box to pass all parameters down to the sub-job/transformation. Further, I've even added the parameter to the child transformation to pass it down to its grandchild. Any ideas?
    Ok so I've figured out what needs to happen and I must say it's absolutely NOT clear when reading the documentation. I'll be sure to add this to the wiki for others to benefit:

    When defining a named parameter in a parent job/transformation via the dialog, you must also specify it explicitly in the child job/transformation. Otherwise, it is not visible. There's absolutely no reason to expect this and it was a pain to figure out. "Pass down to sub-job/transformation" rather makes one think that this will work without further action but clearly not.

    It's also strange because you can further reference/dereference these parameters as variables in grand children jobs/transformations despite not defining them explicitly. You define them in the parent and child and then they are somehow "global". Very strange behaviour.

    Over and out.

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    Quote Originally Posted by AJR View Post
    When defining a named parameter in a parent job/transformation via the dialog, you must also specify it explicitly in the child job/transformation. Otherwise, it is not visible.
    This is contrary to my daily experience.
    So long, and thanks for all the fish.

Tags for this Thread

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.