You are not logged in.
Announcement
Unanswered posts
|
Hi Pedro,
Thank You very much for the brief explanation. It makes sense for me and cleared my doubts.
Thanks and Regards,
Pavan
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
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/viewto … 510#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/bcb … _10.tar.gz
Short URL: http://twelio.com/zyrqmt
bcsteepandcheap_2012-04-10.tar.gz... (194.49MB) - Completed
Download: https://sizablesend.com/file/2s5fi2/bcs … _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
pedro wrote:
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
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
Hi all,
Can any one give me a solution for the above mentioned scenario?
Thanks and Regards,
Pavan
Hi Pedro,
Any Comments/Update on the above mentioned process of how to do the same process in a loop?
Thanks and Regards,
Pavan
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
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
Hi all,
Can any one please help with a working solution?
Thanks and Regards,
Pavan
Hi all,
Any Ideas for the above mentioned?
Thanks and Regards,
Pavan
Hi all,
Any solution for the above mentioned scenario? Where should i change my job in order to run my job successfully with out errors
Thanks in advance
Thanks and Regards,
Pavan
Hi Elvis,
I had done the same way you mentioned, it doesn't work, "File not Found" error is coming when i run the job after making the changes which you had specified
Thanks and Regards,
Pavan
elvis wrote:
Try putting "C:\Test" in the direcory field and context.filename+"*.tar.gz" in the file mask.
I think from what I can gather you are trying to use the directory field as directory AND filemask.
Hi Elvis,
The value of context.filename is comming from tJava where i had declared.
Thanks and Regards,
Pavan
elvis wrote:
What is the value of context.filename? (is it the filename or the directory to look for the file?)
Try putting "C:\Test" in the direcory field and context.filename+"*.tar.gz" in the file mask.
I think from what I can gather you are trying to use the directory field as directory AND filemask.
What is the value of context.filename? (is it the filename or the directory to look for the file?)