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.
Drop the following components from the Palette onto the design workspace: tMysqlInput, tRSSOutput, and tFTPPut.
Right-click tMysqlInput and connect it to tRSSOutput using a Row > Main link.
Right-click tMysqlInput and connect it to tFTPPut using a Trigger > OnSubjobOk link.
In the design workspace, select tMysqlInput, and click the Component tab to define the basic settings for tMysqlInput.
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.
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.
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.
In the design workspace, select tRSSOutput, and click the Component view to define the basic settings for tRSSOutput.
In the File name field, use the by default file name and path, or browse to set your own for the output XML file.
Select the encoding type on the Encoding Type list.
In the Mode area, select RSS.
In the Channel panel, enter a title, a description, a publication date, and a link to define your input data as a whole.
Click Edit Schema to modify the schema if necessary.
You can click Sync columns to retrieve the generated schema from the preceding component.
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.
To store the complete files on an FTP server:
In the design workspace, select FTPPut, and click the Component tab to define the basic settings for tFTPPut.
Enter the host name and the port number in their corresponding fields.
Enter your connection details in the corresponding Username and Password fields.
Browse to the local directory, or enter it manually in the Local directory field.
Enter the details of the remote server directory.
Select the transfer mode from the Transfer mode list.
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.
Save your Job and press F6 to execute it.
Files defined in the Filemask are copied on the remote server.