(轉)Kettle命令列

來源:互聯網
上載者:User

標籤:

kettle使用命令列來運行ktr和kjb

1:cmd方式運行

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檔案。

2 :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.


而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

 連結:http://www.cnblogs.com/wxjnew/p/3620792.html

(轉)Kettle命令列

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.