tSocketInput
Opens the socket port and listens for the incoming data.
tSocketInput is a listening
component, allowing to pass data via a defined port.
tSocketInput Standard properties
These properties are used to configure tSocketInput running in the Standard Job framework.
The Standard
tSocketInput component belongs to the Internet family.
The component in this framework is available in all Talend
products.
Basic settings
Host name |
Name or IP address of the Host server |
Port |
Listening port to open |
Timeout |
Number of seconds for the port to listen before closing. |
Uncompress |
Select this check box to unzip the data if relevant |
Die on error |
This check box is selected by default. Clear the check box to skip |
Field separator |
Character, string or regular expression to separate fields. |
Row separator |
String (ex: ” |
Escape Char |
Character of the row to be escaped |
Text enclosure |
Character used to enclose text. |
Schema type and Edit |
A schema is a row description, that is to say, it defines the Click Edit
|
 |
Built-in: The schema will be |
 |
Repository: The schema already |
Encoding type |
Select the encoding from the list or select Custom and define it |
Advanced settings
tStatCatcher Statistics |
Select this check box to gather the Job processing metadata at a |
Global Variables
Global Variables |
ERROR_MESSAGE: the error message generated by the
NB_LINE: the number of rows read by an input component or A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see |
Usage
Usage rule |
This component opens a point of access to a workstation or server. |
Limitation |
Due to license incompatibility, one or more JARs required to use |
Passing on data to the listening port
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
-
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. -
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
-
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. -
In File Name, browse to the file, and
fill the Row, Field
separators, and Header
fields according to the input file used. -
Describe the Schema of the data to be
passed on to the tSocketOutput
component.The schema should be propagated automatically to the output component. -
Select the tSocketOutput component and
set the parameters on the Basic Settings
tab of the Component view. -
Define the Host IP address and the
Port number where the data will be
passed on to. -
Set the number of retries in the Retry
field and the amount of time (in seconds) after which the Job will time
out. -
Now on the other Job (SocketInput) design, define the
parameters of the tSocketInput
component. -
Define the Host IP address and the
listening Port number where the data are
passed on to. -
Set the amount of time (in seconds) after which the Job will time
out. -
Edit the schema and set it to reflect the whole or part of the other Job’s
schema.
Executing the Jobs
-
Press F6 to execute this Job
(SocketInput) first, in order to open the listening port and prepare it to
receive the passed data. -
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.