Variable flat file reader

The flat file reader:

  • Reads flat input files.
  • Transforms them into Interplay Objects.
  • Saves these objects in the database.

The Java class called VariableFlatFileReader must be declared in the interplayPublicContext.xml file as follows:

<bean id="documentReaderFlatFile"



<property name="readerType" value="VariableFlatFile"/>

<property name="dataSource" ref="jdbcDataSource" />


The input flat file must have a linear structure and comply with the following rules:

  • Each Object or Element must be on one line and the attributes separated by delimiter characters.
  • The type of the line must be indicated in the reader configuration section of the Collection Type configuration file under the Rank property. This property indicates the rank of the property that stores the type of the line.

The reader uses the:

  • Properties file that contains information that will be transformed into properties of the Collection associated with the imported document.
  • Data file that contains the actual data that should form the Collection, the Objects and their elements.

A section can be included at the end of each line to store the errors associated with the line.

The reader settings must be defined in the Collection Type that defines the structure of the file to import.

Related Links