Scenario 1: Creating an RSS flow and storing files on an FTP server - 6.1

Talend Components Reference Guide

EnrichVersion
6.1
EnrichProdName
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 Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for Data Quality
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

In this scenario we:

  • create an RSS flow for files that you would like to share with other people, and

  • store the complete files on an FTP server.

This scenario writes an RSS feed XML file about a Mysql table holding information about books. It adds links to the files stored on an FTP server in case users want to have access to the complete files.

Dropping and linking components

  1. Drop the following components from the Palette onto the design workspace: tMysqlInput, tRSSOutput, and tFTPPut.

  2. Right-click tMysqlInput and connect it to tRSSOutput using a Row > Main link.

  3. Right-click tMysqlInput and connect it to tFTPPut using a Trigger > OnSubjobOk link.

Defining the data source

  1. In the design workspace, select tMysqlInput, and click the Component tab to define the basic settings for tMysqlInput.

  2. Set the Property type to Repository and click the three-dots button [...] to select the relevant DB entry from the list. The connection details along with the schema get filled in automatically.

  3. In the Table Name field, either type your table name or click the three dots button [...] and select your table name from the list. In this scenario, the Mysql input table is called "rss_talend" and the schema is made up of four columns, TITLE, Description, PUBDATE, and LINK.

  4. In the Query field, enter your DB query paying particular attention to properly sequence the fields in order to match the schema definition, or click Guess Query.

Creating an RSS flow

  1. In the design workspace, select tRSSOutput, and click the Component view to define the basic settings for tRSSOutput.

  2. In the File name field, use the by default file name and path, or browse to set your own for the output XML file.

  3. Select the encoding type on the Encoding Type list.

  4. In the Mode area, select RSS.

  5. In the Channel panel, enter a title, a description, a publication date, and a link to define your input data as a whole.

  6. Click Edit Schema to modify the schema if necessary.

    Note

    You can click Sync columns to retrieve the generated schema from the preceding component.

  7. Save your Job and press F6 to execute this first part.

    The tRSSOutput component created an output RSS flow in an XML format for the defined files.

Writing the complete files to an FTP server

To store the complete files on an FTP server:

  1. In the design workspace, select FTPPut, and click the Component tab to define the basic settings for tFTPPut.

  2. Enter the host name and the port number in their corresponding fields.

  3. Enter your connection details in the corresponding Username and Password fields.

  4. Browse to the local directory, or enter it manually in the Local directory field.

  5. Enter the details of the remote server directory.

  6. Select the transfer mode from the Transfer mode list.

  7. On the Files panel, click on the plus button to add new lines and fill in the filemasks of all files to be copied onto the remote directory. In this scenario, the files to be saved on the FTP server are all text files.

  8. Save your Job and press F6 to execute it.

    Files defined in the Filemask are copied on the remote server.