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 with FlatFile class stereotype |
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) |
UTF-8 |
default |
ISO-8859-1 (Latin1) |
|
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. Alternatively, you can compose the flat file to a Blob object (see parameter data). Note, that the name parameter takes priority over data. |
|
tmp/myFlatFile.txt |
data |
Blob |
out |
() |
If you want to compose the FlatFile object to a Blob object, use this parameter as output of the compose action. Alternatively, you can write the composed flat file directly to the file system (see parameter name). Note, that the name parameter takes priority over data. |
|
|