One Star tpk
One Star

tFileUnarchive doesn't unzip .tar.gz files

Hi,
As a part of daily job i have to copy files from one location to another location and unzip the copied files. The file format is .tar.gz. I used tFileUnarchive component which is used to unzip files, but it is not working for .tar.gz file format.
Is there any other component to unzip .tar.gz files? or Can any one tell me how to use winzip.exe to unzip the files using talend?
TOS for DI Version:5.0.1.r74687
Thanks and Regards,
Pavan
35 REPLIES
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
The component tFileUnarchive can unzip *.tar.gz file.
Do you encounter any errors?
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
yes, I encounter few problems while using tfileUnarchive. I have attached the screen shots of the job and error. Please give me any solution or correct me if i am using the component wrongly
Thanks and Regards
Pavan
Hi Pavan
The component tFileUnarchive can unzip *.tar.gz file.
Do you encounter any errors?
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi,
Can any one give me the solution how to solve the problem i am facing?
Thanks and Regards,
Pavan
Hi Pedro,
yes, I encounter few problems while using tfileUnarchive. I have attached the screen shots of the job and error. Please give me any solution or correct me if i am using the component wrongly
Thanks and Regards
Pavan
Hi Pavan
The component tFileUnarchive can unzip *.tar.gz file.
Do you encounter any errors?
Regards,
Pedro

One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi all,
Can any one give me the solution for the problem i am facing?
Thanks and Regards,
Pavan
Hi,
Can any one give me the solution how to solve the problem i am facing?
Thanks and Regards,
Pavan
Hi Pedro,
yes, I encounter few problems while using tfileUnarchive. I have attached the screen shots of the job and error. Please give me any solution or correct me if i am using the component wrongly
Thanks and Regards
Pavan
Hi Pavan
The component tFileUnarchive can unzip *.tar.gz file.
Do you encounter any errors?
Regards,
Pedro


One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi
Sorry for my delay to answer.
I have reproduced this issue in TOS 5.0.1 and it works fine.
Can you delete tFileCopy and just run tFileUnarchive only?
If you still encounter the same error, you'd better check "Archive File" parameter of tFileUnArchive.
Or click on "..." button to browse the file.
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
I still encounter the same problem, can u guide me what path should be give in "Archive File" parameter
Thanks and Regards,
Pavan

Hi
Sorry for my delay to answer.
I have reproduced this issue in TOS 5.0.1 and it works fine.
Can you delete tFileCopy and just run tFileUnarchive only?
If you still encounter the same error, you'd better check "Archive File" parameter of tFileUnArchive.
Or click on "..." button to browse the file.
Regards,
Pedro
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
Could you send me an email and attach this tar.gz file?
I will test it for you.
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
The Size of the file is 169 MB, i can't send it as attachment, is there any alternative?
Thanks and Regards,
Pavan
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
I think this may be due to this tar.gz file.
Because I can unzip mysql-5.5.8-linux2.6-i686.tar.gz or other tar.gz files in TOS 5.0.1.
Which OS do you use?
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
I Use Windows Server 2008 R2 Datacenter, TOS for DI 5.0.1
Thanks and Regards,
Pavan
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
Is there any other way to unzip the files, how can i use winzip.exe component in my job to unzip the files. I had read in component manual documentation that by using tSystem_1 we can use .exe's in our job, but i could not understand the demonstration example that was given in documentation. Can u help me out?
Thanks and Regards,
Pavan
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
It's the same with using commands in CMD.
You can get more info here.
Still I think there is something wrong with your tar.gz file.
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
If there is a problem then the particular file should not be extracted by winzip.exe also right? I use Winzip.exe directly in my SSIS job to accomplish this requirement it works fine there.
Thanks and Regards,
Pavan
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
I think this is an issue with tFileUnarchive_1 component. Inside the "*.tar.gz" if there are files with size 1.5 GB and more than 1.5 GB tFileUnarchive_1 is unable to unzip/process those files. I had checked with other "*.tar.gz" files which have .tsv files compressed inside these "*.tar.gz" files with size 1.43 GB, it is working for them and i am able to unzip these files. Let me put it in more clear way
If there are files compressed with size >1.5 GB ----- tFileUnarchive not able to unzip the "*.tar.gz" files
If there are files compressed with size <1.43 GB -----tFileUnarchive is able to unzip the "*.tar.gz" files
Can u please check in this way?Because i am able to unarchive the files with less size
I had attached the images of files which tFileUnarchive could unzip and image of File which tFileUnarchive_1 could not open/unzip. Kindly go through them i think they will be helpful for your better understanding
Thanks and Regards,
Pavan
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
Any Comments on the above mentioned?
Thanks and Regards,
Pavan
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
I feel so sorry about this. Because I can't reproduce this issue in my local machine.
Here are some images.
Now the workaround is to use tSystem to call winzip.exe.
Did anybody encounter this issue before?
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
Can you give me the syntax how to execute the command in tSystem component, i am not able to trace out the correct syntax that should be given, as far as my understanding i had given the below command in the Command property type
"cmd winzip32 -e -o C:/Test1/bcsteepandcheapiphoneapp_2012-03-30.tar C:/Test"
But i think it does not work out,am i doing any thing wrong here?
Can you help me please?
Thanks and Regards,
Pavan
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
Can you give me the code syntax to execute in tSystem component for unzipping the file?
Thanks and Regards,
Pavan.
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi all,
Can any one tell me how to write the winzip.exe command in tSystem component to unzip the files?
Thanks and Regards,
Pavan
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
Finally I get a trial version of winzip from internet.
new String[]{"C:\\Program Files\\WinZip\\WINZIP32.exe" ,"-e", "-o" ,"D:/mysql.tar.gz" ,"D:/Test"}

Type this in tSystem component.
C:\\Program Files\\WinZip\\WINZIP32.exe : this is the absolute path of winzip32.exe
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
I am getting the below error, can you help me out?
I have attached the images of the job and alert message.
Thanks and Regards,
Pavan
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
This is because the file path "C:/Test1/bcbackcountry_2012-04-08.tar" is wrong.
You'd better recheck it and change it into this pattern.
"C:\\Test1\\bcbackcountry_2012-04-08.tar.gz"

Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
Even i change the path as you mentioned still the same the alert appears to be same
Thanks and Regards,
Pavan
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
I am giving you the links below where you can download the zip files and check what is wrong with the zip files and kindly suggest what i need to do to run it properly. The file format is fixed it can not be changed because this is the format that our client send us files daily from the past. Earlier we have an SSIS job which will call the WinZip.exe in the job to accomplish the extraction, now as we are moving the job to talend i am using tFileUnarchive to accomplish this job, but i think there is no much luck with me in using this component
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
You can use the above path to download the files
Thanks and Regards,
Pavan

Hi Pavan
Could you send me an email and attach this tar.gz file?
I will test it for you.
Regards,
Pedro
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
Thanks for your feedback.
I will download it soon and test it for you.
Regards,
Pedro
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
Thank you very much, I will be waiting for your valuable feed back on the above.
Thanks and Regards,
Pavan
Thanks for your feedback.
I will download it soon and test it for you.
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pavan
After some attempts, I find that the suffix of these two files are wrong.
They should be .gz but not tar.gz.
If I rename these two files, the tFileUnarchive works fine. Or I shall get the errors you mentioned above.
SizableSend.com-Upload-04-25-2012-887977---bcsteepandcheap_2012_04_10.gz
SizableSend.com-Upload-04-25-2012-887978---bcsteepandcheap_2012_04_10.gz

I do these tests in TOS 5.0.1 and TOS 5.1.0.
My OS is win7 32bit.
I don't think this is an issue related to file size.
Wait for your feedback.

Regards,
Pedro
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Do you need to change c:/Test to c:\\Test
One Star tpk
One Star

Re: tFileUnarchive doesn't unzip .tar.gz files

Hi Pedro,
If we change the name of the file it works but this is going to complicate the job as this extraction is interlinked with the job which we had discussed in the below link
http://www.talendforge.org/forum/viewtopic.php?id=23454
After extraction of each file 13 files will be extracted and from that 13 files i will read hit_data.tsv file which will be processed by the tOracleBulkExec which u can see the job in detail in the above link i had given. But if i do as you mention by changing the name of the file the extracted file name is changed to the changed gz file name and obviously tOracleBulkExec will fail because it will fetch for hit_data.tsv file. So this wont work out. I think this is definitely an issue with tFileUnarchive component, because my remaining all files are being extracted with out changing the file name, why should i now change the file name?

Thanks and Regards,
Pavan