1.ktr的運行:運行transformation文件是通過Pan.bat來運行的。
打開cmd命令行窗口,轉到Pan.bat所在的目錄,如d:\data-integration,然后執行文件的命令為:pan /file D:\etltest\EtltestTrans.ktr
2.kjb的運行:運行job文件是通過kitchen.bat來運行的。
打開cmd命令行窗口,轉到Pan.bat所在的目錄,如d:\data-integration,然后執行文件的命令為:kitchen /file D:\etltest\jobOK.kjb
2.bat文件運行
如果覺得通過打開命令行輸入麻煩,我們可以把它寫在一個批處理文件中。如:
d:
cd D:\data-integration
pan /file D:\etltest\EtltestTrans.ktr
把這些內容保存在pan.bat里,通過雙擊panKtr.bat就可以執行ktr文件了。
同樣地,我們把下面的內容:
d:
cd D:\data-integration
kitchen /file D:\etltest\jobOK.kjb
保存在kitchenKjb.bat里,雙擊它,也可以執行kjb文件。
而options 后面可以是=也可以是:也可以是空格
kitchen.bat /file d:\ 或者 -file=D:\ 或者/file:D:\
下面是windows系統下一個完整的執行kettle程序的 bat 批處理文件的內容
======================================
e:
cd E:\Tools\data-integration
Kitchen.bat -rep repname -user admin -pass admin -dir /dirname -job jobname -level=basic>D:\kettlelog\kettlelog.log
kettle 的 kitchen.bat 參數說明
Options:
/rep : Repository name
/user : Repository username
/pass : Repository password
/job : The name of the job to launch
/dir : The directory (dont forget the leading /)
/file : The filename (Job XML) to launch
/level : The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing)
/logfile : The logging file to write to
/listdir : List the directories in the repository
/listjobs : List the jobs in the specified directory
/listrep : List the available repositories
/norep : Do not log into the repository
/version : show the version, revision and build date
/param : Set a named parameter <NAME>=<VALUE>. For example -param:FOO=bar
/listparam : List information concerning the defined parameters in the specified job.
/export : Exports all linked resources of the specified job. The argument is the name of a ZIP
file.