通过父作业运行 Talend 子作业 [英] Running Talend child jobs through a parent job

查看:37
本文介绍了通过父作业运行 Talend 子作业的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个将读取文件的 Talend 作业父作业.该文件将包含所有子作业名称.所以运行时父作业必须遍历文件中的每个条目(即每个子作业名称)并执行子作业.任何人都可以请指导我.

解决方案

您可以使用

第一块是将您的文件加载到上下文中,您可以使用属性文件或分隔文件.

我使用了包含此内容的属性文件:

jobs=a;c;b;a

您必须添加一个名为 jobs 的字符串类型上下文变量以将属性值放入其中.

现在,我们的作业列表存储在上下文变量中,我们需要使用

最后,这是如何设置 tRunJob 组件:

这里指定要执行的作业,但执行顺序由文件指定!

I want to develop a Talend job parent job which will read a file. This file will have all the child job names. So the parent job when run must go through each entry in the file (ie each child job name) and execute the child job. Can anyone please guide me on this.

解决方案

You can use the tRunJob dynamic job feature, I executed 3 sub jobs called a, b and c, and the order is specified in the file, see below :

First block is to load your file into context, you can use a properties file or delimited file.

I used properties file with this content :

jobs=a;c;b;a

You have to add a string typed context variable named jobs to put the propertie value into.

Now, our job list is stored in a context variable, we need to iterate through them using tJavaFlex and update a context variable called currentjob:

And finally, this is how to set tRunJob component:

Here you specify jobs to be executed, but the execution order is specified by the file !

这篇关于通过父作业运行 Talend 子作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆