kettle 参数传递_kettle中含有参数传递的定时任务

本文详细介绍了如何在Kettle中进行参数传递,包括使用Pan.bat和kitchen.bat运行ktr和kjb文件的方式,以及创建批处理文件简化操作的方法。同时,文章还列举了kitchen.bat的参数说明,帮助读者理解Kettle的命令行执行过程。
摘要由CSDN通过智能技术生成

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 =. 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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值