How to schedule Pentaho Kettle transformations?

旧街凉风 提交于 2019-12-03 21:42:08

You can execute transformation from the command line using the tool Pan:

Pan.bat /file:transform.ktr /param:name=value

The syntax might be different depending on your system - check out the link above for more information. When you have a batch file executing your transformation you can just schedule it to run using any scheduling tool on the whatever system you are running.

Also, you could put all the transformation in a job and execute that from the command line with Kitchen.

There are basically two ways of scheduling jobs in PDI.

1. You can use the command line (as correctly written by Anders):

for transformation scheduling: <pentaho-installation directory>/pan.sh -file:"your-transformation.ktr"

for job scheduling: <pentaho-installation directory>/kitchen.sh -file:"your-transformation.kjb"

2. You can also use the inbuilt scheduler in Pentaho Spoon.

If you are using the EE version of PDI, you will have a inbuilt scheduler in the spoon itself. Its an UI interface which you can use it to easily schedule jobs. You can also read this section of doc for more.

I'd like to add another answer that many first-time spoon users miss. Let's say you have a transformation exampleTrafo.ktr that you want to run in a certain interval. Then what you could do is create a job exampleJob.kjb which merely runs the transformation. If you do so, you will have to create something that looks like this:

The START node here is the important thing: right klick on it and choose Edit... and you'll be presented with a job scheduling window where you can specify your desired job schedule. Then save and run this job (either locally or eventually remote on a slave using PDI's carte server). Basically what you will end up with is a indefinitely running job called exampleJob that will execute your exampleTrafo in the desired intervals.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!