FTP transfert

Six Stars

FTP transfert

Hi,

TAC 6.2

 

I've got a question about ftp transfer.

I'm trying to get files with folders from a windows server to another windows server througth Talend Unix server.

The Get part works fine and all files with folders are in the Talend server.

My problem is in the put part.

When i put those files, i'm loosing the folders or i think it tries to copy the file with the tree Talend server.

First tree server is ./Folder1/file

Talend is ./home/user/Folder1/file

Second tree server is ./Folder1/file

 

My job:

 

tFtpConnection1 ==> tFTPGet

II

V

tFtpConnection2 ==> tFileList ==> tFTPPut

 

The tFileList get all files and folders.

In the tFTPPut, the files are ((String)globalMap.get("tFileList_1_CURRENT_FILE"))

It doesn't work.

Wher do i miss something ?

Do i have to zip all files/folders from 1st server and unzip it in the 2nd one ?

 

Thanks.

 

 

Moderator

Re: FTP transfert

Hello,

Please use  tFTPFileList instead of tfilelist component which is used to list files in local not FTP server.

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: FTP transfert

Hello Sabrina.

 

the ftpget copy from the server 1 to the Talend Server.

Then from local Talend Server  to server 2, so that's why i used the fFileList.

If i can copy the files directly from server1 to server2 using tftpget or tftpput, it will be nice but it seems i can't do it.

 

Six Stars

Re: FTP transfert

Here is my job

Eight Stars sgv
Eight Stars

Re: FTP transfert

Hi,

essaye plutôt avec ça ^^

((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))

 

Good luck,

SGV

Six Stars

Re: FTP transfert

Hi,

 

Si je prend la valeur ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")), j'aurai l'arborescence du serveur local Talend qui n'est pas la meme que celle du serveur 1 et 2. :-(

D'où mon problème.

-------------------------

If i use the ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH")) value, i will have the Talend tree which is not the server 1 and 2

That's my problem.

How can i do ?

Eight Stars sgv
Eight Stars

Re: FTP transfert

Hi,

 

T'es sûr de tes variables de context ? T'as essayé avec des valeurs en dur et non avec des variables ?

--------

Are you sure about your context var ? Dit you try to put the value directly in the component instead of using variable ?

 

Good luck ,

SGV

Six Stars

Re: FTP transfert

Hi,

 

Oui, dans le tfilelist, je vois bien tous mes fichiers et l'arborescence à partir du repertoire temp Talend.

Sauf qu'il ne me recopie ni les répertoires, ni les fichiers qui sont à l'intérieur. Il n'y a que les fichiers du niveau du répertoire temp qui sont copiés.

J'ai pourtant un user avec tous les droits. Il y a quelque chose qui m'échappe.

Moderator

Re: FTP transfert

Hello,

This is an international forum and English is the language we use. Posting in English will allow you to get more visibility and more help. Thanks for your understanding!

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: FTP transfert

Hi

 

In the tfilelist, i see all my files and folders from temp Talend folder.

But the tftpput don't transfer the folders and files that are in those folders. Only the files that are in the first folder are copied.

My user have all rights so there's something i'm missing but where ?

Six Stars

Re: FTP transfert

Moderator

Re: FTP transfert

Hello,


Clopes wrote:

Is this topic always valid ?

https://www.talendforge.org/forum/viewtopic.php?id=12656

 


We are planning to close fluxbb (old community portal) in the future. Do you need to move this thread to the new Community? Feel free to let us know it.

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: FTP transfert

Hello everyone.

 

I still not transfert my files with their folders from production server to another server.

My job is :

 

Job.jpg

Get.jpgGetListe.jpgListput.jpgPut

I can transfert from prod to Talend server with the files AND the folders.

But when i want to transfert them to the last server, i loose the folders tree and all files are copied into the root folder loosing every folder.

Where did i miss something ?

Moderator

Re: FTP transfert

Hello,

From your screenshots, we see that you are using context value in fields. Does your job works perfectly with your FTP directory path directly?

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: FTP transfert

Hello,

 

From Prod to Talend => Yes

From Talend to the 2nd server directory => No

All the tree structure is lost and the files are copied below the root folder.

Moderator

Re: FTP transfert

Hello,

You are using two tFTPConnection components in your work flow, tFTPConnection_1 and tFTPConnection_2.

Did you select tFTPConnection _1 from component list in tFTPPut component? Is it connecting to the server 1?

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: FTP transfert

yes

 

the first one is connected because i can retrieve the files to Talend server.

The second one is connected too.

Moderator

Re: FTP transfert

Hello,

Do you want to transfer your files from one FTP to another FTP server? They are at the same place? tFTPPut is used to copy selected files from a defined local directory to a destination remote FTP directory. Where is your destination remote FTP directory connection?

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: FTP transfert

yes

 

i want to transfer my files from one FTP to another FTP server but they're not at the same place.

 

I thought i had to go through the Talend server.

Is there another way to transfert files from server 1 to server 2 without copying them in Talend server ?

Moderator

Re: FTP transfert

Hello,

So far, talend don't support for transferring data by air.

It means you have to retrieve your selected files from one FTP server(by using tFTPGet component) into a local directory firstly and then put them on another FTP server(by using tFTPPut component).

Feel free to let us know if it is OK with you.

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: FTP transfert

Sabrina,

 

I've created this post because i CAN'T do what you are recommending.

I can do the ftpget but the ftpput doesn't work

Moderator

Re: FTP transfert

Hello,


Clopes wrote:
Is there another way to transfert files from server 1 to server 2 without copying them in Talend server ?

So far, talend don't support for transferring data by air.  You cannot directly transfer your files from FTP server1 to server 2 without copying them to a local directory.

Could you please try to put your local file into your destination remote FTP directory by using tFTPPut component to see if it works?

The work flow looks like: tFTPConnection(destination remote FTP server)-->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: FTP transfert

Sorry but it doesn't work
Moderator

Re: FTP transfert

Hello,

You are still losing folders tree and all files are put into the root folder instead of every folder?

Have you already tried to check out " Move to the current directory" option in tFTPPut component?

This option appears when " Use an existing connection" is enabled.  You can select this check box to change the directory to the one specified in the Remote directory field.

 

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: FTP transfert

It does nothing.

I've tried the move to the current directory and unchek it, put the folders local and distant in hard (no context variable).

I can connect to the server because i've tried the tFTPFileList but the put doesn't do anything.

May be it's my mask ?

Regex is uncheked and i have the "*" to retrieve the folders and the files.

Moderator

Re: FTP transfert

Hello,

When you enter the name of the remote directory you want to upload, do you put "/" at the beginning and "/" at the end of the path?

Note:The ftp component don't have a function of creating directory. So, it is impossible to copy a directory from local to a ftp server, it is only used to transfer file.

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: FTP transfert

I have just tried with the / at the beginning and the end and i have this warning

 

[WARN ]: clients.jcltgreqlisyncserverprod2rec_0_1.jCLTGREQLISyncServerProd2Rec - tFTPPut_1 - No match file exist!

I have added the "*QVD" and "*.csv" and created the folders in the remote server as the connector will not create them as you said.

Sans titre.jpg

Moderator

Re: FTP transfert

Hello,

In your tFTPPut componet, you are using a relative path for your local directory? Your selected files is not from a defined local directory?

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: FTP transfert

Ok

Got it.

 

the folders source are

../Qlik/test2/test1.QVD

../Qlik/test2/test2.csv

../Qlik/test1/test.csv

 

And destination is

/test2/

 

I thought that in the tftpput local repertory, not writing all the path will take all folders in source.

Wrong.

If i write /Qlik/test2 to /test2/test2 it works.

How can i retrieve all files with folders dynamically to dynamically destination ?

Six Stars

Re: FTP transfert

I'm executing y job in local so it's a local folder