Page 1 of 1

Wait for file activity stage

Posted: Wed Nov 29, 2006 9:30 am
by splayer
How do I wait till my file has completely copied to the folder before I say that Wait For File Acitvity is successful and fire off the next stage?

Posted: Wed Nov 29, 2006 9:44 am
by seanc217
From what I have heard most people send a trigger file after the file you want to monitor for transfer is complete. So, you would monitor for the trigger file and then start your job.

Hope this helps

Posted: Wed Nov 29, 2006 9:54 am
by chulett
Exactly... an empty trigger file, typically, that is only sent after the main data file has completely transferred. Otherwise you face exactly the situation you've described - the WFF triggers the moment it detects the file, finished or not.

Also referred to as a 'semaphore' file.

Posted: Wed Nov 29, 2006 9:55 am
by kris007
Here's one of the practices I have been following. Define a process such that whenever you are copying a file say A.txt it is followed by another dummy file say A.dummy. In this case, once A.txt is copied completely, A.dummy is copied. Now all you will need to do is wait for A.dummy before you start processing A.txt. Hope that was clear. :wink:

Posted: Wed Nov 29, 2006 9:59 am
by splayer
I know about this solution as it has been discussed in this forum before. This requires that the source process be changed to send the 2nd file. I was wondering if there was a solution using only OS(UNIX) tools or Datastage but apparently there isn't.