The CSV Socket Writer is an embedded adapter that writes comma-separated value (CSV) data to a socket. It closely resembles the CSV File Writer adapter. Unlike the CSV File Writer adapter, though, this socket adapter writes output data to a TCP socket connected to a specified external address.
| Property | Description | Default |
|---|---|---|
| Server Mode | Select this check box to have the adapter operate in server mode, listening for and accepting incoming connections from remote clients. | cleared |
| Max Connection Count | The maximum number of simultaneous connections the adapter accepts when in server mode. | false |
| Host Name | The host or IP address to connect to when not in server mode. | localhost |
| Port | The TCP port to connect to or, when in server mode, to listen on. | 9000 |
| Field Delimiter | The delimiter used to separate tokens. | , |
| String Quote Character | Matching pairs of the quote character delimit string constants. | " |
| Flush Interval | How often, in seconds, controls flushing tuples to the network. Set this value to zero to flush immediately. | 1 |
| Null Value Representation | String to write when a field is null. | null |
| Throttle Error Messages | Only show a given error message once. | false |
| String Quote Option | Determines when string fields are quoted in the CSV file: Quote if necessary, Always quote, or Never quote. | Quote if necessary |
| Reconnect Count | The number of times the adapter should try to reconnect to the socket when not in server mode. 0 means attempt to reconnect indefinitely. | 0 |
| Poll Frequency | The time, in seconds, to wait between reconnect attempts. | 5 |
| Log Level | Controls the level of verbosity the adapter uses to issue informational traces to the console. This setting is independent of the containing application's overall log level. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE, and ALL. | INFO |
Typechecking fails in the following circumstances:
-
The Flush Interval is less than zero.
-
More than one string quote character is specified.
-
More than one field delimiter is specified.
-
An illegal string quote option is specified.
-
The Poll Frequency is less than zero.
-
If the adapter is unable to connect to the socket, it emits a warning and attempts to reconnect as per the Reconnect Count property. If it is unable to connect after the configured number of retries, it emits a warning and shuts down.
