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
---------------------------------------------------------- Talend | Data Agility for Modern Business
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
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
Bob, There's always the "old way." I had a similar problem and had the people who send the file add a final step to THEIR job that generates the file to create a second file called "DONE" in the same directory. So, then all I have to do is look for DONE file. Because it only shows up when the sender job has completed writing the file.
Since our file transfer could be anywhere from 5 seconds to 5 hours, we needed a solution that was checking the file. We didn't want to check the size changing because we felt this may be unreliable and we needed a 100% failure proof solution. Our solution to this was to use the tJavaFlex component and pur this code into the "start" code area. Use this component following the tWaitforFile. CheckFileUsage FileChecker = new CheckFileUsage(); boolean fileInUse = true; context.customerFileIn = ((String)globalMap.get("tWaitForFile_1_FILENAME"));