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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

"File Not Found" exception for tFileUnarchive

Hi all,
As a part of my daily job i have to copy files from source directory and paste them in one single directory and process each file at a time and after processing the first file i have to move the processed first file to another directory and remove it from the directory where the file is processed so that it will avoid processing the same file when the loop is repeated. To accomplish all the above mentioned process i have done one job. All the settings are given correctly for each component, but when i run my job an exception is thrown "File Not Found".

But, Literally the file with the name is present in the specified location, i don't understand why i am getting this exception, can any correct me what is wrong in my job and what should be corrected to run my job with out any errors?
I had attached the images of my job and the error which i got while executing my job.
Kindly help me to resolve the problem.
Thanks and Regards,
Pavan
Labels (2)
19 Replies
Anonymous
Not applicable
Author

Hi all,
Any Ideas for the above mentioned?
Thanks and Regards,
Pavan
Anonymous
Not applicable
Author

Hi all,
Can any one please help with a working solution?
Thanks and Regards,
Pavan
Anonymous
Not applicable
Author

Hi
I don't know what you do with tOracleBulkExec.
According to your requirement, you can create a job as below. There is no need to use three tFileList.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro,
Thanks for the pain you had taken out for doing an example job, I use tOracleBulkexec to process the unarchived file after it is unarchived. The example which you had given is good enough if the source directory i.,e C:/Test had only one zip file, but i have some 14-15 files in the source directory. So let me explain you in a more clear way in step wise manner
1. First i need to take the first file for the first iteration and pass it to tFileUnarchive so that it will unarchive the zip file

2. Now after the tFileUnarchive un-archives the zip file in C:/Extraction directory, now the tOracleBulkExec will process one .tsv file which is unzipped by the tFileUnarchive component.
3. After the tOracleBulkExec process is over now i need to remove the First processed zip file and move it to C:/Imported directory(Which means that all the processed files will be placed in this directory)
4. And also i need to delete the extracted files which are extracted in C:/Extraction (this is because when second file is processed tOracleBulkExec must not process the same files of the First zip file)
The above mentioned process should be iterated in a loop for about 14-15 times.
But the example you had given will not work in a loop. How can this be accomplished to do in a loop for the entire process for each single file at a time?
Thanks and Regards,
Pavan
Anonymous
Not applicable
Author

Hi Pedro,
Any Comments/Update on the above mentioned process of how to do the same process in a loop?
Thanks and Regards,
Pavan
Anonymous
Not applicable
Author

Hi all,
Can any one give me a solution for the above mentioned scenario?
Thanks and Regards,
Pavan
Anonymous
Not applicable
Author

Hi Pavan
Sorry for my delay to answer.
According to your description at comment #14, I create a new job.
This time i'm sure it will work fine. I simply use tFileList to loop.
Now there are two tar.gz files(abc.tar.gz and abc2.tar.gz) under C:\Test directory in my local computer.
Loop1: tFileList gets the absolute file path of abc.tar.gz.
tFileUnarchive unzip abc.tar.gz.
Use onComponentOK to trigger tOracleExec.
After finishing tOracleExec, use onComponnetOk to trigger tFileCopy. Copy abc.tar.gz from C:\Test to C:\Imported and remove source file(abc.tar.gz) in C:\Test.
Use tFileList_2 to iterate files under C:\Extraction. Then tFileDelete will delete one.csv.
Loop2 : Start to get abc2.tar.gz.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro,
I had done the changes which you had mentioned, in fact i had done the job the same way before but the output links which i had given to the components were wrongly given. I had given "Iterate" out put links to all the components earlier in my job. After changing the output links to "OnComponent OK" it worked. So based on this i had few questions
1. What is the difference between Iterate and OnComponent OK?
2. Why does the job failed if i use Iterate in all the components?

And coming back to the job again, the job went on smoothly for small files, but for big files the tFileUnarchive can not extract the files. We had discussed earlier about this in the below mentioned link
http://www.talendforge.org/forum/viewtopic.php?pid=83510#p83510
So i had sent you the download links where the files are up loaded, Could you please take a look at it and give me a solution, the download links are as below
bcbackcountry_2012-04-10.tar.gz... (207.55MB) - Completed
Download: https://sizablesend.com/file/ec3xw3/bcbackcountry_2012_04_10.tar.gz
Short URL: http://twelio.com/zyrqmt

bcsteepandcheap_2012-04-10.tar.gz... (194.49MB) - Completed
Download: https://sizablesend.com/file/2s5fi2/bcsteepandcheap_2012_04_10.tar.gz
Short URL: http://twelio.com/izjgn6
I also attach the error which i am getting when i am using big files to extract. My development environment is as below
TOS:5.0.1
OS: Windows Server 2008 R2 data center
RAM: 8GB

Hi Pavan
Sorry for my delay to answer.
According to your description at comment #14, I create a new job.
This time i'm sure it will work fine. I simply use tFileList to loop.
Now there are two tar.gz files(abc.tar.gz and abc2.tar.gz) under C:\Test directory in my local computer.
Loop1: tFileList gets the absolute file path of abc.tar.gz.
tFileUnarchive unzip abc.tar.gz.
Use onComponentOK to trigger tOracleExec.
After finishing tOracleExec, use onComponnetOk to trigger tFileCopy. Copy abc.tar.gz from C:\Test to C:\Imported and remove source file(abc.tar.gz) in C:\Test.
Use tFileList_2 to iterate files under C:\Extraction. Then tFileDelete will delete one.csv.
Loop2 : Start to get abc2.tar.gz.
Regards,
Pedro
Anonymous
Not applicable
Author

Hi
1. What is the difference between Iterate and OnComponent OK?
2. Why does the job failed if i use Iterate in all the components?

I will explain it in a simple way.
The difference between Iterate and OnComponentOK is that OnComponentOK(OnSubjobOk) will declare a new method in Job code for one component while using Iterate it will in the same method with previous component.
When using Iterate, it may cause the wrong execution order of these components. Or sometimes some important values are not ready.
When using OnComponentOK, the method where the first component exists will call this new method. Make sure the right order and prepare all global values...
Regards,
Pedro
Anonymous
Not applicable
Author

Hi Pedro,
Thank You very much for the brief explanation. It makes sense for me and cleared my doubts.

Thanks and Regards,
Pavan