Jane
Jane

Reputation: 23

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.

Upvotes: 0

Views: 662

Answers (1)

Codex
Codex

Reputation: 131

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.

Upvotes: 2

Related Questions