This page explains the Flat File Adapter in Bridge context. If you were looking for the same information regarding the PAS Designer, refer to Flat File Adapter in the Designer guide.

For a flat file that contains a header row, you can easily filter out the header row while processing the file.

Example File (Builder project Spreadsheet):

<your example path>\Libraries\Spreadsheet\uml\useLibSpreadsheet.xml

The definition in the activity diagram remains the same. In the class diagram define a second <<FlatFileRecord>> class for the header records and assign it to the <<FlatFile>> class.

It is not possible to use header record information to define dynamically attribute names of the following data records.

With the tagged value lineNumber=1 the first record is taken into class Header. If the flat file has more than one header record, you must specify a <<FlatFileRecord>> class for each of the header records and set lineNumber accordingly.

Figure: Flat File With Header Record

In this example, a semicolon (;) separates the record fields. Due to the fact that there are multiple <<FlatFileRecord>> classes on the same level, the tagged value evaluationOrder manifests the order in which the records occur in the file.

It's strongly recommend to use evaluationOrder in such cases, because if not, the order of the associations in the UML model is taken and this depends on the order in which the associations have been drawn.

  • No labels