Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split file to more files in talend

Tags:

talend

I'm looking for a way how to split job execution in talend studio according to actual file row - I'd like to process file rows starting with "DEBUG" in one job branch and another rows in another job branch. It that possible?

like image 534
Betlista Avatar asked Jan 19 '26 21:01

Betlista


2 Answers

To do this, use a tMap component. Your job will look like this

   t*Input--row-->tMap--out1--->tFileOutput*

                      --out2--->tFileOutput*

In the tMap component, you have input on the left and output on the right. In your output table, select "Activate expression filter" and use the text box to define your filter-- only rows that match that filter will be ouput from that connection. You can have as many output tables and filters as you need.

like image 175
user1483583 Avatar answered Jan 23 '26 15:01

user1483583


Using tMap is cool, but if number of output stream is not defined and fixed, tMap is not a good choice.

In this case using iterate link or tjavaflex can help you:

Have a look at this tutorial on "how to split a file into many files regarding a key on each record" which explains how to solve this kind of task. It is actually only available in french. The tutorial shows 3 different technics to achieve this task.

like image 26
MordicusEtCubitus Avatar answered Jan 23 '26 14:01

MordicusEtCubitus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!