kettle組件javaScript腳本官方案例2

文件位置:

$KETTLE_HOME/samples/transformations/data-generator/JavaScript - Access environment variables.ktr

組件1:Generate Rows

生成10行,沒有列

組件2:Java Script Value

getVariable(strVarName, "")和setVariable(strVarName,strVarValue, "r")是一對,右鍵-點擊sample便可以看到方法的說明和用法

這兩個方法也有對應的組件,其中type參數表示設置變量的作用範圍

system:Valid in the Java Virtual Machine

root:Valid in the root job

parent:Valid in the root job

grandparent:Valid in the grand-parent job

詳細解釋::

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章