In my Pentaho workflow, I have a Modified Javascript Value
step where I included the following code to calculate the number of words in a string and output it to a file:
var str = "How are you doing today?";
var res1 = str.split(" ").length;
To provide input to this step, I used a Generate Rows
step with a dummy variable. However, when checking the output, instead of seeing the expected result of 5 once, it is printed multiple times as shown below:
tmp_dummy;res1
;5
;5
;5
;5
;5
;5
;5
;5
;5
;5
;5
The variable tmp_dummy
was defined in the 'Generate Rows' step. Can anyone explain why the output '5' is repeated so many times? This process was done using Kettle Spoon.