kettle中含有参数传递的定时任务
(1)新建一个作业(新建->作业),并在控制面板右键:
(2)设置一个命令参数:
(3)把作业的参数传递给转换:
(4)在转换中右键设置转换属性:
(5)接收作业中设置的传递参数:
(6)参数的获取:
(7)用命令行执行此.kjb文件:
进入到kitchen目录下
执行的命令:
数据库设计:
一:
二:
附加( 附加部分转发自:http://www.cnblogs.com/loren-love-xixi/articles/5716774.html):
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.
相关文章
- Python 定时任务框架 apscheduler
- 在windows server 2012/2016上,任务管理器性能页面增加磁盘监控的办法
- 定时任务:crontab: installing new crontab
- Linux Crontab 定时任务
- 【华为OD机试真题 python】任务最优调度【2022 Q4 | 200分】
- Spring @Scheduled定时任务动态修改cron参数
- Linux中包管理与定时任务
- SpringBoot实现动态增删启停定时任务
- threading.Timer()定时器实现定时任务
- 爬淘宝的商品信息下 (下) -- 实现定时任务爬取
- Flink作业任务部署解读
- 20activiti - 流程管理定义(查询个人任务)
- C03-Java同步实践加强班第12周上机任务
- Spring Boot 实现定时任务的动态增删启停
- supervisor 与 yii定时任务 crontab的使用
- TP6:Worerman定时任务的后台守护执行
- 详解java定时任务
- 介绍几种等待多线程任务执行完毕的方法
- Spring+quartz集群配置,Spring定时任务集群,quartz定时任务集群
- 网络虚拟化有助于实现合规性任务
- 转 Windows 7设置定时自动执行任务方法
- Vitrualbox 桥接网卡界面名称未指定、Filters currently installed on the system have reached the limit、不能为虚拟电脑 打开一个新任务
- JAVA 睡眠、定时任务
- SpringBoot执行定时任务
- 定时任务
- 【原】Linux环境下Shell调用MySQL并实现定时任务
- ASP.NET quartz 定时任务
- linux的crontab定时任务命令