简体   繁体   中英

how can I use the variables from one javascript in other javascript in the same transformation?

I am new at Pentaho Kettle. Can someone tell me, how can I use the variables from one javascript in other javascript in the same transformation?

In first Java-Script I saved a date in a variable (var new_date) and in the second javascript-step I am trying to add a new column, where each cell will have a value of this variable (var new_date). But the variable is not defined.

Thank you for your help.

At the bottom of your modified javascript step you can create stream fields to copy your values to. Then call them in your next javascript steps as they're not part of the stream. All you do is stick the variable name in the 'fieldname' box and rename it to whatever you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM