File-based

File Tailer

Characteristics:

  • File Tailer monitors a given file in a given location.

  • Data is processed line by line.

  • Note that the File Tailer does not support the definition type List in the Information Model.

Supported File Formats:

  • CSV

  • JSON

  • XML

Information Model Requirements

The first Node after the root node rootNode must be of type Event eventNode.

CSV

  • The node after the Event must be of type List listNode - multiple lines, each representing a data record.

  • Fields, which are separated by commas, are represented by the Node Type Variable variableNode. Note that the order of fields in the CSV file must match the order of Variables in the Information Model.

CSVConfiguration

XML

  • Elements of the XML file are represented by the Node Type Variable variableNode.

  • Attributes of the XML file are represented by the Node Type Property propertyNode. In order to assign attributes to elements in the Information Model, the element Node Type variableNode must be a Custom Data Type.

CSVConfiguration

How to configure the File Tailer (CSV) Channel

  1. Select File tailer (CSV) from the Drop-Down.

  2. Click the Configure button.

CSVConfiguration
  1. Make sure the root model node is selected to be able to configure the File Tailer to String and CSV String to Model.

  2. Enter the file path for the CSV-file on your machine.

CSVConfiguration_FileTailerToString
  1. Enter the separator which is used in the CSV-file as well as the string delimiter, the eol delimiter and the timestamp format if one is used.

  2. If the CSV file contains a header enable ignoreFirstLine.

CSVConfiguration_CSVStringToModel
  1. Select the event node in the tree on the left side.

Note

The entries of a CSV-File can only be mapped directly to an Event object and its parameters.

  1. Check the routes checkbox.

  2. Enter a regular expression for the message filter.

  3. Click the Apply button, then the Close button and save the Channel by clicking the Save button on the upper right corner.

CSVConfiguration

Description of configuration properties:

Property

Description

Example

Separator

Separator type, used in the csv file

, , ;

Delimiter

Values that have an additional delimiter like “Date”, “Time”

"

Eol Delimiter

Defining Carriage return and/or Line Feed

\r, \n

Timestamp format

Format of the timestamp

YYYY-MM-DD HH:mm:ss

File

Path to the csv file

C:\test.csv

Delay Millis

Delay between checks of the file for new content in milliseconds

250

TailFromEnd

Set to true to tail from the end of the file, false to tail from the beginning of the file

true, false

ReopenBetweenChunks

If true, close and reopen the file between reading chunks

true, false

routes

Path of a node in the Information Model

true, false

messageFilterRegEx

Regular Expression for the message filter used in the implementation

.*

File Reader

Characteristics

  • File Reader monitors a specified folder - the so-called input folder

  • If a file is inserted the following actions take place:

    • The Trigger of the specified Rule in the Mapping is activated

    • Thus, the Rule is executed

  • After successful execution of the rule the file is moved into a so-called output folder

  • In case of an exception the file is moved into an error folder

Supported File Formats:

  • CSV

  • JSON

  • XML

Information Model Requirements

The first Node after the root node rootNode must be of type Event eventNode.

CSV

  • The node after the Event must be of type List listNode - multiple lines, each representing a data record.

  • Fields, which are separated by commas, are represented by the Node Type Variable variableNode. Note that the order of fields in the CSV file must match the order of Variables in the Information Model.

CSVConfiguration

XML

  • Elements of the XML file are represented by the Node Type Variable variableNode.

  • Attributes of the XML file are represented by the Node Type Property propertyNode. In order to assign attributes to elements in the Information Model, the element Node Type variableNode must be a Custom Data Type.

CSVConfiguration

How to use File Reader with CSV

  1. Select File reader (CSV) from the Drop-Down.

  2. Click the Configure button.

File Consumer Configuration
  1. Make sure the root model node is selected to configure the File Consumer to String as well as the CSV String to Model.

  2. File Consumer to String - Configuration

    • Enter a path for the input folder - InFolder

    • Enter a path for the process folder - ProcessFolder

    • Enter a path for the output folder - OutFolder

    • Enter a path for the error folder - ErrorFolder

    • Specify the polling interval

    • Select the CharSet according to the file in use

File Consumer Configuration
  1. CSV Consumer to Model - Configuration

    • Enter the separator which is used in the CSV-file

    • If needed: Set string delimiter, eol delimiter and the timestamp format

    • If the CSV file contains a header enable ignoreFirstLine

FileConsumerWithCSVStringToModel
  1. Specify the Event used by selecting the event node in the tree on the left side

Note

The entries of a CSV-File can only be mapped directly to an Event object and its parameters.

  1. File Consumer to String - Configuration

    • Enable the FileNameFilter checkbox

    • Enter a regular expression in order to determine which file is to be processed in the input folder

  2. Csv String to Model - Configuration

    • Enable the routes checkbox

    • Start of processing

      • If the entire content of the file is processed on this event enter a wildcard in the RegEx field

      • If the processing starts at a specific line enter a regular expression in the RegEx field to identify the line

  3. Click the Apply button, then the Close button and save the Channel by clicking the Save button

FileConsumerWithCSVStringToModel

Description of configuration properties:

Property

Description

Example

Separator

Separator type, used in the csv file

, , ;

Delimiter

Values that have an additional delimiter like “Date”, “Time”

"

Eol Delimiter

Defining Carriage return and/or Line Feed

\r, \n

Timestamp format

Format of the timestamp

YYYY-MM-DD HH:mm:ss

ignoreFirstLine

Delay between checks of the file for new content in milliseconds

true, false

TailFromEnd

Set to true to tail from the end of the file, false to tail from the beginning of the file

true, false

InFolder

Path leading to the Input Folder

C:\FileConsumer\In

OutFolder

Path of a node in the Information Model

C:\FileConsumer\Out

ErrorFolder

Regular Expression for the message filter used in the implementation

C:\FileConsumer\Error

CharSet

Encoding of the file in use

UTF-8, `UTF-8 BOM, ..

ProcessFolder

Regular Expression for the message filter used in the implementation

C:\FileConsumer\Process