Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Wait for Input Feed file

Hi All
My project requirement is to check on input feed file location did file came from UPSTREAM, if yes the ETL should load it. 
In case feed file not came from UPSTREAM wait and check after sometime 3 attempts.
We have component like tWaitFile which is working perfectly once the file arrives.
I need help in case after 3 attempts of checking the file did't came how should i capture the flow and log error.


Thanks

Labels (2)
2 Replies
Anonymous
Not applicable

If tWaitForFile is not working for you, then it sounds like you need a loop.
tLoop->tFileExists(NotExists)->tJava_1
                          (Exists)->tJava_2
In tJava_1, you can Thread.sleep(xxxx) and set a flag (globalMap) to indicate that the file was not found.
In tJava_2, you can set a flag (globalMap) to indicate that the file was found, and do your stuff. You'll also want to set the loop-to value to the current iteration count so that you're loop exists (read the help for the different tLoop options).
You can then have tLoop(OnSubJobOK)->tJava_3
In tJava_3, you test your flag so that you can raise an error if no file was processed.
_AnonymousUser
Specialist III
Specialist III
Author

Thanks mate for taking out the time and replying.