Six Stars

[resolved] To unzip the zip files in remote machine

Hi Team,
There are many folders in remote machine. These folders has zip files. I want to unzip and put those files in same path.
I have tried like this:
tftpfilelist--iteration-->tfileunarchive
Thanks in advance!
 
1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: [resolved] To unzip the zip files in remote machine

Hi,
I have given this value for the field Archive file: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) and  extraction directory: ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")).

You can give a local path instead of ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")) in extraction direactory.
Please see my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
9 REPLIES
Moderator

Re: [resolved] To unzip the zip files in remote machine

Hi,
tfileunarchive is woking on local machine. So far, talend don't support for handing data by air

How about downloading these files into local machine firstly and then unzipping them. After that, you can put these unzipped files into FTP.
The work flow should be:
tFtpFileList-->tFtpGet-->tFileunarchive-->tFtpPut
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: [resolved] To unzip the zip files in remote machine

Hi Sabrina,
Thanks for reply.
I have a doubt on above work flow.
In this workflow, what global value I have give in the tfileunarchive for the fields Archive file and extraction directory.
Thanks,
Sravanth 
Seventeen Stars

Re: [resolved] To unzip the zip files in remote machine

If the remote directories can be mounted with smb (Windows) or NFS (UNIX) you can extract the files directly on the remote machines because it works like a local file system. On Windows you can use an UNC path to address the files.
But what ever you do it remains the fact the actually unzip procedure takes place on you local machine! It is you CPU what extracts the files and using a network drive is by far the slowest way to unzip the files. Therefore the suggestion Sabrina made is fine. Of course you should replace the FTP transfer with something reliable but the principe still remains.
Six Stars

Re: [resolved] To unzip the zip files in remote machine

  Hi ,
I have doubt on this workflow(tFtpFileList-->tFtpGet-->tFileunarchive-->tFtpPut), which was suggested by Sabrina.
I have added one more thing in the above workflow as this:
tFtpFileList-->tFtpGet-->tfilelist-->tFileunarchive-->tFtpPut
what global value I have to give in the tfileunarchive for the fields Archive file and extraction directory?
I have given this value for the field Archive file: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) and  extraction directory: ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")). I am able to extract the files into my local machine but I am unable to move to remote machine with above flowchat. I am getting on the tfileunarchive component
Thanks in advance!
Seventeen Stars

Re: [resolved] To unzip the zip files in remote machine

Could you please set as view the variable __UNIQUE_NAME__ so I can find out which component fits to which globalMap variable?
Moderator

Re: [resolved] To unzip the zip files in remote machine

Hi,
I have given this value for the field Archive file: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) and  extraction directory: ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")).

You can give a local path instead of ((String)globalMap.get("tFileList_1_CURRENT_FILEDIRECTORY")) in extraction direactory.
Please see my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Moderator

Re: [resolved] To unzip the zip files in remote machine

Hi sravanth49,
Is there any update for your issue?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Six Stars

Re: [resolved] To unzip the zip files in remote machine

Hi Sabrina,
Thanks for reply. Its working now.
Moderator

Re: [resolved] To unzip the zip files in remote machine

Hi,
Thanks for your feedback. Feel free to post your issue here.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.