Search code examples
talendtalend-mdm

Talend tFileList Usage and File rejection


I am newbie to Talend, currently i have designed a job to read files of a certain pattern using tfilelist and put into hadoop. Is there any way to send the rejected files to another folder. Also I tried with providing regex for not choosing a certain pattern of file, but it seems not working. eg: - Like I have 4 files,

 1) bd20.101.log
 2) bd20.102.log
 3) bd20.103.log
 4) bd200.100.log

I want to get only the regex which gives me 4th type which is not a similar pattern.


Solution

  • Yes you can in a Tmap output option. You need to create a second output. One you put your normal output and a second with the reject.

    In you tfilelist you can put a filter to read all your file with a patern like "bd20*" (the star wil take all the file start with bd20).

    then in yout tmap you do an output with the parameter reject like the screen.

    Then in the path of your tfileoutput you pass the dynamic variable of your tfilelist :

    • "C:\" + ((String)globalMap.get("tFileList_1_CURRENT_FILE"))

    enter image description here