I need to use the trigger tWaitforFile component and then begin processing that file. The tWaitforFile component doesn't wait for the file to complete the transmission and prematurely begins the next step. tSleep won't help me because the file can be as many as 80 million rows and take an unknown amount of time to finish copying. How can I tell the component to trigger after file is finished?
- Bob
Hello
The tWaitforFile is used to minitor a folder, if there is a new file created in this folder, it will tigger another action. on the next step, you can do your transmission. Note that, you should run the job first to monitor the folder.
Best regards
shong
Maybe I wasn't clear. I need to use the file in the next step, but it isn't done getting to the folder. How do I make Talend wait until the file is copied completely?
Not that I know of... 5484 maybe you could link to a tFileProperties and filter on a certain file size, but then you'd have to loop through (tWaitForFile -> tFileProperties -> tFilterRow) until the file was the size you wanted, so that might not be so helpful
Thank you for opening an issue log. I am sure I am not the only one who would like to see this. I will try the file properties loop as you suggest and hope for an easier component someday.
Bob, I had the same problem as you, maybe it will help you. I use tWaitForFile to wait until my report is generated and once it is ready I send it as attachment in e-mail (tSendMail). I added 1 extra line at the very bottom of script where I generate report to copy created file into the same folder. I rebuilt my job and I have now: tWaitForFile_1 --iterate--> tWaitForFile_2 --iterate--> tSendMail_1 --onComponentOk--> tFileDelete_1 In tFileDelete_1 I delete copied file (from tWaitForFile_2). I hope it helps for you. Marcin
strpdsnk,
your solution looks more profesional.
Could you provide few lines of code with how it should be written for people who are not experienced in Java, please?
Thanks,
Marcin