文件位置:
$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
詳細解釋::