脚本:
#!/bin/bash
last_date=`date +%Y%m%d --date="1 day ago"`
kettle_home=/opt/kettle/pdi-ce-7.1.0.0-12/data-integration
repo=PRD
user_name=admin
passwd=admin
dir=/DATA_CHECK
job=check_done_send_mail
log=/home/kettlelog/${job}_${last_date}.log
${kettle_home}/kitchen.sh -rep ${repo} -user ${user_name} -pass ${passwd} -dir ${dir} -job ${job} -level=debug >> ${log}
~
一下摘自https://www.jianshu.com/p/33efeb73543f
/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:\等等都可以
pan.sh 运行参数基本与kitchen.bat相同
运行转化 的参数:
-trans