我正在尝试使用Pentaho开发一个step plugin ,
我使用textVar()输入列出变量。
问题是没有列出从上一步创建的自定义变量,所以我尝试在我的代码中使用environmentSubstitute(${var})来获取变量的值,并且没有任何影响!
所以请引导我以正确的方式列出使用前面步骤创建的自定义变量,以便在我的自定义步骤插件中的textVar()输入中列出它。
I'm trying to develop a step plugin using Pentaho,
I used textVar() Input for listing the variables.
the problem is that the custom variables that created from the previous step aren't listed, so i tried to used environmentSubstitute(${var}) inside my code for fetching the variable's value, and no thing effected !.
so please guide me to the right way for listing the custom variables that created using the previous steps , for listing it inside textVar() input inside my custom step plugin.
最满意答案
经过多天的测试,我成功地使用以下列表列出了以前的字段名称:
Combo wField = new Combo(); String[] inputFields = transMeta.getPrevStepFields(stepname).getFieldNames(); Arrays.sort(inputFields); for (String fName : inputFields) { wField.add(fName); }就这样 :)
After many days of testing , I succeeded of listing previous field names using the follwoing :
Combo wField = new Combo(); String[] inputFields = transMeta.getPrevStepFields(stepname).getFieldNames(); Arrays.sort(inputFields); for (String fName : inputFields) { wField.add(fName); }That's all :)
更多推荐
发布评论