简体   繁体   English

在pentaho中从批处理文件运行多个作业

[英]running multiple jobs from a batch file in pentaho

I would like to ask if there is a more efficient way of running multiple transformations(70 transformations) besides the IDE? 我想问一下,除了IDE之外,是否还有一种更有效的方式来运行多个转换(70个转换)? Doing it the IDE way is alright but it does become tedious having to click all the tabs and the hidden tabs as well. 可以使用IDE的方式进行操作,但是必须单击所有选项卡和隐藏的选项卡确实变得很繁琐。

What I did was I tried using the pan.bat command and placed it in a bat file. 我所做的是尝试使用pan.bat命令并将其放置在bat文件中。 The bat file would look like this: bat文件如下所示:

cd <to dest of kitchen.bat>

pan.bat <mytransformation 1>
pan.bat <mytransformation 2>
pan.bat <mytransformation 3>
pan.bat <mytransformation 4>

But it only works on the first transformation and then it quits. 但是它仅适用于第一个转换,然后退出。 Am I doing something wrong or what options do I have to run multuple transformations from script 我在做错什么还是必须从脚本运行多个转换的选项?

Thats what a JOB is for. 那就是工作的目的。 Create a Job (or jobs) to run these transformations and execute with kitchen not pan. 创建一个或多个Job来运行这些转换并在不平移的情况下执行。

You can also dynamically execute KTR's if you want to as well. 您也可以根据需要动态执行KTR。 ie execute all KTRs in a given folder etc. 即执行给定文件夹中的所有KTR等。

Running via a job should be marginally faster too as you're not starting and stopping the entire VM every time. 通过作业运行也应稍快一些,因为您不必每次都启动和停止整个VM。 (which is surprisingly expensive) (非常昂贵)

Additionally running via a job gives you control over error handling, parallelisation and sequencing. 此外,通过作业运行使您可以控制错误处理,并行化和排序。

When calling a batch file from another, you have to use the call command, otherwise (as you found) it transfers control to the new batch file permanently. 从另一个调用批处理文件时,必须使用call命令,否则(如您所找到的)它将控制权永久转移到新的批处理文件中。

call pan.bat <mytransformation 1>
call pan.bat <mytransformation 2>
call pan.bat <mytransformation 3>
call pan.bat <mytransformation 4>

Try this: 尝试这个:

pan.bat "mytransformation 1"

.. or: .. 要么:

start /b "" "pan.bat" "mytransformation 1"

You can combine all transformations as a single or 2 jobs then call the job this is a efficiency way to call the all transformations in single job. 您可以将所有转换组合为一个或两个作业,然后将其称为作业,这是在单个作业中调用所有转换的一种有效方式。

In pentaho by default jobs are running sequence mode if you want run parallel mode you can easily 在pentaho中,默认情况下,作业正在运行序列模式,如果要运行并行模式,则可以轻松实现

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM