Composing Flat Files
After having defined the structure of the flat file, you can use the Flat File adapter to compose a flat file from this structure.
Drag the compose operation to your diagram as described on Flat File Adapter. Provide the data in the flat file structure and provide an encoding or localization if necessary.
You can compose to an object of type Blob or to the filesystem. The path and file name of the file you want to compose to can be given dynamically via input parameter name, or statically via the definitions of an alias.
Name | Type | Direction | Mandatory | Description | Allowed Values | Example | |
---|---|---|---|---|---|---|---|
anyObjectFlow | Any | in | Provide an object containing the flat file data. The class defining the type of this object should have stereotype FlatFile and should depict the structure of the file. | ||||
encoding | String | in | Provide the encoding of the file to be composed as specified on Charset Definitions. | any valid encoding (see Charset Definitions) |
| ||
default |
| ||||||
locale | NumbersLocale | in | Specify how number values will be treated, when written to the flat file (decimal point, currency symbol, ...). You can overwrite the system locales here. Refer to Number Formatting for more information. | default | system locales | ||
name | String | in | ( | Specify a full path to the flat file, if you want to write the FlatFile object to the file system. |
| ||
data | Blob | out | ( | If you want to compose the FlatFile object to a Blob object, use this parameter as output of the compose action. |
If you provide both parameters, name and data, the Flat File object will be written to the file system.
FlatFileAdapter_ProductExport_Example
Click here to download a simple example model that shows the usage of the Flat File adapter in Scheer PAS Designer.