Adapter type: xml_in. The File XML Input adapter reads a file in XML format.
This adapter polls for new data appended to a file, and supports schema discovery.
If you use the CCL ATTACH ADAPTER statement to attach an adapter, you must supply the adapter type.
<Trades Id="0" Symbol="EBAY" TradeTime="2000-05-04T12:00:00" Price="140.0" Shares="50" /> <Trades Id="1" Symbol="EBAY" TradeTime="2000-05-04T12:00:01" Price="150.0" Shares="500" />
<Trades ESP_OPS="i" Id="0" Symbol="EBAY" TradeTime="2000-05-04T12:00:00" Price="140.0" Shares="50" />
Property Label | Property ID | Type | Description |
---|---|---|---|
Directory | dir | 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) | file | tables | (Required) File to which the adapter writes data. No default value. |
Match Stream Name | matchStreamName | boolean | (Optional) If true, XML element name is matched against the stream name. Unmatched messages are discarded. Default value is false. |
Repeat Count | repeatCount | uint | (Optional)
Number of times the input data is repeated. If set to -1, the
input data is repeated indefinitely. Default value is 0. Note: You can use this parameter to test a continuous
streaming source.
|
Repeat Field | repeatField | string | (Optional)
Determines which numeric field's values are bumped on each repeat.
Default value is a hyphen (-).
|
Directory (runtime) | runtimeDir | runtimeDirectory | (Advanced) Location of the data files at runtime, if different from discovery time. No default value. |
File Pattern | filePattern | string | (Advanced) Pattern used to look up files for discovery. Default value is *.xml. |
Poll Period (seconds) | pollperiod | uint | (Advanced) Period for polling new contents, in seconds. Default value is 0. |
Convert to Safe Opcodes | safeOps | boolean | (Advanced) Converts the opcodes INSERT and UPDATE to UPSERT. Converts DELETE to SAFEDELETE. Default value is false. |
Skip Deletes | skipDels | boolean | (Advanced) Skips the rows with opcodes DELETE or SAFEDELETE. Default value is false. |
Date Format | dateFormat | string | (Advanced) Format string for parsing data values. Default value is %Y-%m-%dT%H:%M:%S. |
Timestamp Format | timestampFormat | string | (Advanced) Format string for parsing timestamp values. Default value is %Y-%m-%dT%H:%M:%S. |
Block Size | blockSize | int | (Advanced) Determines the number of records to block into one pseudotransaction. Default value is 1. |
Use Envelopes |
useEnvelopes | boolean |
(Advanced) Specify the block type the adapter uses to pass data to the engine. If you specify a blockSize property greater than zero, by default, the adapter packages rows into transaction blocks to send to the engine. To get the adapter to package rows into envelope blocks instead, set this property to true. Default value is false. |
Field Mapping | permutation | permutation |
Mapping between Event Stream Processor and external fields, for example: <esp_columnname>=<database_columnname>:<esp_columnname>=<database_columnname>. No default value. |
PropertySet |
propertyset | string | (Advanced) Specifies the name of the property set from the project configuration 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: