Kettle使用命令pan/kitchen执行任务时传参问题

在用windows任务执行kettle的kjb或ktr文件时,可通过bat命令传递参数,测试了很久,特此记录一下。

一、pan\kitchen 参数说明

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

二、常规变量的书写格式

options 后面可以是=也可以是:也可以是空格

如:pan /file d:\test.ktr   或者 -file=D:\test.ktr

三、参数变量的特殊格式

window下,一定要用 " " 双引号,多个变量按顺序书写即可(linux下不用引号)

如:pan /file d:\test.ktr "-param:key1=value1" "-param:key2=value2"

四、kjb\ktr参数变量的接收

      一定在任务中定义命名参数,否则参数无法传递成功

  • 4
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值