Listing all files/folders on the FTP root directory - 7.3

FTP

Version
7.3
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Internet components (Integration) > File Transfer Protocols > FTP components
Data Quality and Preparation > Third-party systems > Internet components (Integration) > File Transfer Protocols > FTP components
Design and Development > Third-party systems > Internet components (Integration) > File Transfer Protocols > FTP components
Last publication date
2024-02-21

Configure the tFTPFileList component, the tIterateToFlow component, and the tLogRow component to iterate all files and folders on the FTP root directory and display the names and paths of these files and folders on the console of Talend Studio .

Procedure

  1. Double-click the tFTPFileList component to open its Basic settings view.
  2. Specify the connection details required to access the FTP server. In this example, select the Use an existing connection check box and from the Component list drop-down list displayed, select the connection component to reuse its connection details you have already defined.
  3. In the Remote directory field, specify the FTP server directory on which the files and folders will be iterated. In this example, it is /, which means the root directory of the FTP server.
  4. Double-click the tIterateToFlow component to open its Basic settings view.
  5. Click the button next to Edit schema to open the schema dialog box.
  6. Click the button to add two String type columns filename and filepath that will hold the names and paths of the files to be iterated respectively. When done, click OK to close the dialog box.
  7. In the Mapping table, set the values for the filename and filepath columns. In this example, the global variable ((String)globalMap.get("tFTPFileList_1_CURRENT_FILE")) for filename and the global variable ((String)globalMap.get("tFTPFileList_1_CURRENT_FILEPATH")) for filepath.

    Note that you can fill the values by pressing Ctrl + Space to access the global variables list and then selecting tFTPFileList_1_CURRENT_FILE and tFTPFileList_1_CURRENT_FILEPATH from the list.

  8. Double-click the tLogRow component to open its Basic settings view, and then select Table (print values in cells of a table) in the Mode area for better readability of the result.