You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

After having defined the structure of the flat file, you can use the Flat File adapter to parse a flat file into this structure.

FlatFileAdapter_ProductExport_Example

Click the icon to download a simple example model that shows the usage of the Flat File adapter in Scheer PAS Designer.

Drag the parse operation to your diagram as described on Flat File Adapter. Provide the flat file as a blob in parameter data or specify a path to a file in the filesystem, and provide an encoding or localization if necessary.
The path and file name of the file you want to access can be given dynamically via input parameter name, or statically via the definitions of an alias.

The parsed file is return as an object of the defined flat file structure.

Name Type Direction Mandatory Description Allowed Values Example
data Blob in ((tick)) Provide the flat file data to be parsed.
Alternatively, you can specify a path to a flat file in the file system (see parameter name). Note, that the name parameter takes priority over data.


encoding String in
Provide the encoding of the file to be parsed as specified on Charset Definitions. any valid encoding (see Charset Definitions)
UTF-8
default ISO-8859-1 (Latin1)
locale NumbersLocale in
Specify how number values will be treated, when parsed from the flat file (decimal point, currency symbol, ...). You can overwrite the system locales here, if the file was written with divergent locales. Refer to Number Formatting for more information.

name String in ((tick)) Specify a full path to the flat file to be parsed.
Alternatively, you can parse the flat file from a Blob object (see parameter data). Note, that the name parameter takes priority over data.

tmp/myFile.txt
anyObjectFlow Any
with FlatFile class stereotype
out (tick) The adapter returns a parsed flat file object. The class defining the type of this object should have stereotype FlatFile and should depict the structure of the file.

If you provide both parameters, name and data, the Flat File object will be parsed from the file system.

  • No labels