Show TOC

Socket (As Client) CSV Input AdapterLocate this document in the navigation structure

Adapter type: dsv_sockout_in. The Socket (as Client) CSV Input adapter receives data in delimited format from outgoing network adapters.

The adapter initiates the connection to an external datasource, and an external program sends out the data. The data does not require a header (accepted by streamingconvert). If the file includes a header, the header specifies the field names.

If you use the CCL ATTACH ADAPTER statement to attach an adapter, you must supply the adapter type.

Sample record formats for the data file:
1. hasHeader=true
delimiter=,
expectStreamNameOpcode=false

Ts,ItemID,Price,Quantity,WarehouseZipCode,DeliveryZipCode
2004/06/17 10:00:00.000000,SKU1276532,50.00,1,10012,94086
2004/06/17 10:00:05.000000,SKU6723143,23.00,2,10012,94043

2. expectStreamNameOpcode=true
delimiter=,

Trades_in,i,2004/06/17 10:00:00.000000,SKU1276532,50.00,1,10012,94086
Trades_in,i,2004/06/17 10:00:05.000000,SKU6723143,23.00,2,10012,94043

3. expectStreamNameOpcode=false
timestampFormat=%Y/%m/%d %H:%M:%S
delimiter=,

2004/06/17 10:00:00.000000,SKU1276532,50.00,1,10012,94086
2004/06/17 10:00:05.000000,SKU6723143,23.00,2,10012,94043
Property Label Description
Server

Property ID: host

Type: string

(Required) Server host name. Default value is localhost.

Port

Property ID: port

Type: int

(Required) Server port. If port is set to -1, the adapter reads from the Ephemeral Port File. Default value is 12345.

Stream name, opcode expected

Property ID: expectStreamNameOpcode

Type: boolean

(Optional) If true, the adapter interprets the first two fields as a stream name and opcode respectively. Adapters discard messages with unmatched stream names. Default value is false.

Field Count

Property ID: fieldCount

Type: uint

(Optional) Counts the number of fields in a CSV file, if different from the source stream. Default value is 0.

Delimiter

Property ID: delimiter

Type: string

(Advanced) Symbol used to separate the columns. Default value is a comma ( , ).

Has Header

Property ID: hasHeader

Type: boolean

(Advanced) Determines whether the first line of the file contains the description of the fields. Default value is false

.
Ephemeral Port File

Property ID: epFile

Type: filename

(Advanced) File that contains the server port number, if Port is -1. No default value.

Retry Period

Property ID: retryperiod

Type: uint

(Advanced) Period for trying to re-establish an outgoing connection. In seconds. Default value is 1.

Enter Initial State

Property ID: initial

Type: choice

(Advanced) When the adapter enters the initial loading state. Default value is never.

Convert to Safe Opcodes

Property ID: safeOps

Type: boolean

(Advanced) Converts the opcodes INSERT and UPDATE to UPSERT. Converts DELETE to SAFEDELETE. Default value is false.

Skip Deletes

Property ID: skipDels

Type: boolean

(Advanced) Skips the rows with opcodes DELETE or SAFEDELETE. Default value is false.

MsDate Format

Property ID: msdateFormat

Type: string

(Advanced) Format string for parsing msdate values. Default value is %Y-%m-%dT%H:%M:%S.

SecondDate Format

Property ID: seconddateFormat

Type: string

(Advanced) Format string for parsing seconddate values. Default value is %Y-%m-%dT%H:%M:%S.

Block Size

Property ID: blockSize

Type: int

(Advanced) Determines the number of records in each block. Applies to transaction and envelope modes. Default value is 1.

Field Mapping

Property ID: permutation

Type: permutation

Mapping between Event Stream Processor and external fields, for example:

PropertySet

Property ID: propertyset

Type: string

(Advanced) Specifies the name of the property set. Property sets are reusable sets of properties that are stored in the project configuration file. Using these sets allows you to move adapter configuration properties out of the CCL file and into the CCR file. If you specify the same properties in the project configuration file and the ATTACH ADAPTER statement, the values in the property set override the values defined in the ATTACH ADAPTER statement. No default value.

Known limitations:

  • The adapter ignores the stream name in the file rows.
  • All data is sent to the same stream.