Talend tRunJob Component

Talend tRunJob Component

A job in Talend is what we create to perform a certain desired operation. However, what if we have several such individual jobs and would like to call them form within one another? Imagine that you are the director of your organisation and you need to pull daily sales data from various shops located over the city and have it all inserted into a single excel file. What you would do is created individual Talend jobs that would connect to each shop’s server, pull data from it and append it to an excel sheet. You would have to do it one after the other since you are inserting all data into a single file. Parallel execution would not be an option as if a thread job tries to access an already open excel file, it would fail.

This concept is full proof ! Except there are a number of snags to it’s practical implementation :-

  1. You would need to run each job manually, one after the other, to load an entire day’s data. Now assuming you have just 5 shops around London, then it’s not too cumbersome a task. However, if you have 15 – 20 shops, then it’d be slightly more of a problem. And what if you have shops all over England?
  2. Since you are manually running every job, there is always a good possibility of you running one job many times and/or skipping over jobs. Doing so can lead to major inconsistencies amongst your data.
  3. Since we would have to un each job manually one after the other, a significant portion of our day would be spent fiddling or at least thinking about the jobs. This can be very counter productive.

An elegant solution to this would be to automate the entire process, not only so that it is more accurate, but also so that it can save you precious time and energy. But since you already have individual jobs, it doesn’t make sense to disregard those completely and create a new system from the scratch.

It is in precisely this situation that you will think about using the tRunJob component.

The tRunJob component can be used to execute a different job from within another job.  Let us try to understand this better with the help of an example. Consider we have a simple delimited (CSV) file with data as follows :-

 

 

Leave a Reply