File CSV Output Adapter

Adapter type: dsv_out. The File CSV Output adapter writes data as a file in Event Stream Processor delimited format.

The file does not require a header. If the file includes a header, it specifies the field names. This adapter does not support schema discovery.

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

Property Label Description
Directory

Property ID: dir

Type: directory

(Required) Specify the absolute path to the data files you want the adapter to read. For example, <username>/<folder name>.

No default value.

Use a forward slash for both UNIX and Windows paths.

File (in Directory)

Property ID: file

Type: tables

(Required) File to which the adapter writes data. No default value.

Include Base Content

Property ID:outputBase

Type: boolean

(Optional) If set to true, the adapter outputs the initial stream contents in addition to stream updates.

If this option is enabled and the adapter is running in GD mode, once the adapter has done a GD commit on the entire base data, the ESP Server does not redeliver the base data on adapter restart and only sends deltas that are saved for delivery. The default value is false.

Only Base Content

Property ID: onlyBase

Type: boolean

(Optional) Sends a one-time snapshot of initial contents in a stream. Default value is false.

Prepend StreamNameOpcode

Property ID: prependStreamNameOpcode

Type: boolean

(Optional) If true, each merge starts the stream name and the opcode. Default value is false.

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

.
Directory (runtime)

Property ID: runtimeDir

Type: runtimeDirectory

(Advanced) Location of the data files at runtime, if different from discovery time. No default value.

File Pattern

Property ID: filePattern

Type: string

(Advanced) Pattern used to look up files for discovery. Default value is *.csv

.
Date Format

Property ID: dateFormat

Type: string

(Advanced) Format string to parse data values. Default value is %Y-%m-%dT%H:%M:%S.

Timestamp Format

Property ID: timestampFormat

Type: string

(Advanced) Format string to parse timestamp values. Default value is %Y-%m-%dT%H:%M:%S.

Field Mapping

Property ID: permutation

Type: permutation

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

<esp_columnname>=<database_columnname>:<esp_columnname>=<database_columnname>. No default value.

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.

Runs Adapter in GD Mode

Property ID: enableGDMode

Type: boolean

(Advanced) Specifies whether the adapter runs in guaranteed delivery (GD) mode. GD ensures that data continues to be processed in the case that the ESP Server fails, or the destination (third-party server) fails or does not respond for a long time. See Guaranteed Delivery in the Event Stream Processor Programmers Guide for details on enabling GD for your project.

The default value is false.

Enable the Adapter Internal Cache Mode

Property ID: enableGDCache

Type: boolean

(Advanced) If set to true, only rows that can be recovered (that is, checkpointed) by the ESP Server on restart are sent to the file. Other rows are cached internally by the adapter.

When this option is enabled, you may see a significant increase in latency depending on how frequently the attached stream delivers checkpoint messages. Streams support three modes related to GD: GD not supported, GD supported, and GD supported with checkpoint messages. This setting is ignored if the attached stream does not support GD and does not deliver checkpoint message. The default value is true.

GD Batch Size

Property ID: gdBatchSize

Type: int

(Advanced) Specify after how many message blocks (transactions or envelopes) the adapter issues a commit command to the stream to which the adapter is attached. The default value is 10.

Increasing this value also increases memory consumption in the ESP Server because the uncommitted rows need to be preserved for redelivery in case of failure.