Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Variables frustration

  1. #1

    Angry Variables frustration

    Hi all,

    I'm getting mad on PDI variables.

    I just need to set a variable in a job, then after a Trasformation increment it by 100 and then run that Trasformation again for n times.

    So if the flow will run 4 times I expect to have my variable set it to 300 (0, 100, 200, 300).

    I'm using the Set Variable step with this syntax :

    VAR = ${VAR}+100

    What I get at the end is 0 + 100 + 100 + 100...

    How can I achieve this ?

    Any help will be greatly appreciated.


    Last edited by alessio.missio; 04-27-2018 at 12:06 PM. Reason: attachment

  2. #2
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    That's because Variables are strings.

    You would need to process the variable in the Javascript step.
    https://wiki.pentaho.com/display/EAI...pt+(job+entry)

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.