[英]how can I use the variables from one javascript in other javascript in the same transformation?
I am new at Pentaho Kettle. 我是Pentaho Kettle的新手。 Can someone tell me, how can I use the variables from one javascript in other javascript in the same transformation?
有人可以告诉我,如何在同一转换中使用另一个JavaScript中的一个JavaScript变量?
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). 在第一个Java脚本中,我将日期保存在变量中(var new_date),在第二个javascript步骤中,我尝试添加新列,其中每个单元格都具有该变量的值(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. 在修改的javascript步骤的底部,您可以创建流字段以将值复制到其中。 Then call them in your next javascript steps as they're not part of the stream.
然后在您的下一个JavaScript步骤中调用它们,因为它们不属于流。 All you do is stick the variable name in the 'fieldname' box and rename it to whatever you want.
您要做的就是将变量名保留在“字段名”框中,然后将其重命名为所需的名称。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.