Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Haresh
Contributor
Contributor

How to induce a timedelay when transferring the file from one directory to another by using twaitforfile or custom java code?Because the file is still being written to the source folder

0

I am using talend to pickup file from source folder and transfer to the destination folder,however i want to pickup the file for processing only if the file is completely written in the source or not during/when the file is actively being copied into the source folder.

I realize that in talend when trying to move the file from source to dest. when the file is being still written into source folder-it shows an error message that "file is still being used by another proces" however i dont want that error to be triggered for each every run,i would want to skip and move to the next file in the iteration folder.

Can i use a twait or twaitforfile between components or add java code to handle it such that "presenttime(sysdate)-filetime(arrivaltimeinto the folder)>timedifference(lets say around 3-5 minutes)"

Only if the condition is satisfied move the file to destination folder.

Please suggest which is the best efficient way to handle this.

1 Reply
Anonymous
Not applicable

You may be able to use this solution I have suggested for a different issue and extend it to suit your purposes......

https://community.talend.com/s/feed/0D73p000004tGIFCA2

 

Once you have this data, you could do a second "sweep" of the files and look for differences in size, etc. If there are no differences, then you can focus on moving those files first. Something along those lines