Talend Open Studio for Big Data

207 views Asked by At

there are several servers that each one is including 100 files separately. how I am able to get files from different servers and save them in the different folders through one FTP connection in Talend.

Does anyone have any insight on how to download all files from an FTP? thanks in advance.

1

There are 1 answers

0
54l3d On

Create as many servers you want to connect, 'n' csv files containing these lines:

  • host;server_ip
  • port;port
  • user;user
  • password;password
  • ftp_directory;remote_dir
  • local_directory;local_dir
  • file_mask;file_mask

These files will be loaded to the context of the job, so we need to create context variables with the same names used in the files, Then create your job like this:

enter image description here

  • tFileList: iterate on context files created in first step
  • tFileInputDelimited: read the current file of tFileList: ((String)globalMap.get("tFileList_1_CURRENT_FILEPATH"))
  • tContextLoad: load context variables from current file
  • tFTPGet: use all the context variables as settings