A Read from CSV Socket adapter opens a TCP connection to a given address, specified through Host and Port properties. Once the connection is established, the adapter reads rows from this connection as comma-separated values.
If a connection is lost during adapter execution, it attempts to reconnect.
Property Name (screen) |
Property Name (Attach Adapter) |
Type |
Description |
---|---|---|---|
Host |
Host |
String |
Host name or IP address of the data source. |
Port |
Port |
Integer Min: 1 Max: 65535 Default: none |
Port number of the data source. |
Data Has Title Row |
TitleRow |
Boolean Default: True |
Whether to expect a title row. |
Data has timestamp column |
TimestampColumn |
Boolean Default: True |
Every row must have a row timestamp that indicates the time that the row was created. This row timestamp may be set by the system at the time that the row arrives, or it can be specified by the user (for example, if running a simulation). If the Data has timestamp column flag is true, the adapter assumes that the first column in each row contains a row timestamp and that this row timestamp should be used to control the timing of when the rows are sent to the server. If this flag is set to false, the adapter inserts the row's arrival time into the row timestamp column, and sends the data as quickly as it can. If a row timestamp is supplied, the adapter assumes that the timestamp is represented as a number of microseconds from 00:00:00 Jan 1, 1970 UTC/GMT. |
Timestamp Column Format |
TimestampColumnFormat |
String |
The format in which timestamp values are stored, for example, YYYY/MM/DD HH24:MI:SS.FF. If blank, timestamp values are in microseconds since January 1, 1970, 12:00:00 AM. |
Field Separator Character |
CsvDelimiterString |
String Default: , (comma) |
This indicates which character(s) separate the fields in the data. For most cases, leave this at the default value, which is a comma. However, you can specify a different separator character, such as a vertical pipe symbol ("|") etc. Note that if you specify multiple characters, each of those characters is treated as a separator; the adapter does not look for a multi-character separator. |
Line Continuation Character |
CsvLineContinuationCharacter |
String Default: ^ (caret) |
If a single row of data must be split across multiple input lines, you can specify a line continuation character that tells the adapter to treat the multiple lines as a single row. By default, this line continuation character is the caret ("^") symbol. This character is treated as the line continuation character only if it is the last non-whitespace character preceding a newline. If you specify multiple characters, each of those characters is treated as a line continuation character; the adapter does not look for a multi-character line-continuation indicator. If the line continuation field is empty, no line continuation is possible. This allows data with wildly varying input characters to be properly processed. |
String Quote Characters |
CsvQuoteCharacters |
String Default: ' (single quote) and " (double quote) |
By default, both the single quote and the double quote characters may be used to delimit a string. If you specify multiple characters, each of those characters is treated as a quote character; the adapter does not look for a multi-character quote indicator. If the string is started with a double quote character, it must end with a double quote character, and single quote characters within that string are treated as regular characters rather than as the end of the string. Similarly, if the string is started with a single quote character, then it must end with a single quote character, and any double quote characters within the string are treated as normal characters. If you change the defaults, then only the character(s) you specify are treated as quote characters. |
NULL string value |
CsvNullString |
String Default: NULL |
This allows you to specify what value indicates a NULL value in the file. The value should not be quoted. If the NULL string value is the word NULL (without quotes), then the value "NULL" (with quotes) is a 4-letter string, not an indication that you want to use a NULL value. If you do not specify a NULL string value, then an empty string field, where there is nothing between the field separator characters for that field, is treated as NULL. |
Line Terminator Character |
CsvLineTerminatorChar |
String Default: \n |
This allows you to specify what character represents the end-of-line character. You specify the character in one of the following ways: \n This 2-character sequence represents the Line Feed character (ASCII 10). \r This 2-character sequence represents the Carriage Return character (ASCII 13). \t This 2-character sequence represents the Tab character (ASCII 9). <any printable char> This 1 character may be any printable character, for example, '$', '|', etc., except the backslash. Note that you enter the character without any quotation marks and without any leading backslash. \x## , where "#" represents a hexadecimal digit (0-9, A-F). Thus, for example, to indicate that you want to use ctrl-Z as the end-of-line character, you would specify the 4-character sequence \x26 |
Escape Characters |
CsvEscapeCharacters |
String Default: \ |
The characters used to escape the special meaning of other characters, such as column separators and quotes. |