Scenario: Passing on data to the listening port - 6.3

Talend Open Studio for Big Data Components Reference Guide

EnrichVersion
6.3
EnrichProdName
Talend Open Studio for Big Data
task
Data Governance
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

The following scenario describes two Jobs aiming at passing data via a listening port. The first Job (SocketInput) opens the listening port and waits for the data to be sent over. The second Job (SocketOutput) passes delimited data from a file to a defined port number corresponding to the listening port.

Another application for the Socket components would be to allow controlled communication between servers which cannot communicate directly.

Dropping and linking components

  1. For the first Job, drop a tSocketInput component and a tLogRow component from the Palette to the design workspace, and link them using a Row > Main connection.

  2. For the second Job, drop a tFileInputDelimited component and a tSocketOutput component from the Palette to the design workspace, and link them using a Row > Main connection.

Configuring the Jobs

  1. On the second Job, select the tFileInputDelimited and on the Basic Settings tab of the Component view, set the access parameters to the input file.

  2. In File Name, browse to the file, and fill the Row, Field separators, and Header fields according to the input file used.

  3. Describe the Schema of the data to be passed on to the tSocketOutput component.

    The schema should be propagated automatically to the output component.

  4. Select the tSocketOutput component and set the parameters on the Basic Settings tab of the Component view.

  5. Define the Host IP address and the Port number where the data will be passed on to.

  6. Set the number of retries in the Retry field and the amount of time (in seconds) after which the Job will time out.

  7. Now on the other Job (SocketInput) design, define the parameters of the tSocketInput component.

  8. Define the Host IP address and the listening Port number where the data are passed on to.

  9. Set the amount of time (in seconds) after which the Job will time out.

  10. Edit the schema and set it to reflect the whole or part of the other Job's schema.

Executing the Jobs

  1. Press F6 to execute this Job (SocketInput) first, in order to open the listening port and prepare it to receive the passed data.

  2. Before the time-out, launch the other Job (SocketOutput) to pass on the data.

    The result displays on the Run view, along with the opening socket information.