Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Can I use variable in Select Value

  1. #1
    Join Date
    Nov 2015
    Posts
    3

    Default Can I use variable in Select Value

    hey,

    I want to know. can we use variable in select value step for field name.

    please help me

    Thanks
    Rushikesh

  2. #2
    Join Date
    Nov 2015
    Posts
    6

    Default

    Not sure what issue you are having. Try this:
    Objective: we will create a datagrid with columns a,b and values a,b. We will then create a parameter (MyField) which indicates which field we want to replace with the value in b.

    1. Create a new transform.
    2. Right click on transform area, select Properties, then on the Parameters tab add a parameter called "MyField" with the value "a".
    3. Add a "Data Grid" transform, and create two columns and two values (first tab defines types (a,string; b,string), second tab describes values (a,b)).
    4. Add a "Set field value" transform and as the "field name" type "${MyField}, and as the "Replace by value from field" type "b".

    Finally, Run, then select the "Set field Value" transform, and "Preview data" tab at the bottom.

    You see:
    Columns: a b
    Values: b b

    Showing that you replaced the value in field a with the value in field b using "MyField" as the parameter.
    Last edited by daveg; 04-07-2016 at 03:50 PM.

  3. #3
    Join Date
    Nov 2015
    Posts
    3

    Default

    thanks for replying

    i got the solution for my issue

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.