Stereotype Attributes
Flat File Adapter
Attribute | Description | Allowed Values |
---|
alias | Specify the File alias the adapter should use to establish the connection. | any valid File alias |
action
| Multiexcerpt include |
---|
SpaceWithExcerpt | INTERNAL |
---|
MultiExcerptName | info_alias_attribute_action |
---|
PageWithExcerpt | INTERNAL:_designer_excerpts |
---|
|
|
|
Flat File FlatFile (Class)
A class having this stereotype is the root record of the flat file definition. This class cannot have any properties, only associations to FlatFileRecord classes and FlatFileGroup classes are allowed.
Multiexcerpt |
---|
|
Attribute | Description | Allowed Values | Example |
---|
escapeCharacter | Defines the character used for escaping when a reserved character is used within a field value. | any character | / | fillCharacter | Defines a dummy character to fill non-existent values (results in NULL). Used for fixed property layout only. | any character | 0 | quoteCharacter | The quoteCharacter will be ignored by reading field value. | any character | / |
---|
recordSeparator | Separator Separator of the different records, normally line feed and carriage return. For serialized files, any other character can be defined. | any character or one of | C Syntax | Character (Dec.) | <newline> | <esc> |
| \x1B | 27 | <newline> | Parses correctly on Unix and Windows platforms. | \n | 10 | <space> |
|
| 32 | <tab>
<tabulator> |
| \t | 9 | <unixnewline> | Composes newline. | \n | 10 | <windowsnewline> | Composes newline and carriage return. | \r\n | 13, 10 | escapeCharacter | Defines the character used for escaping when a reserved character is used within a field value. | any character | / | quoteCharacter | The quoteCharacter will be ignored by reading field value. | any character | / | fillCharacter | Defines a dummy character to fill non-existent values (results in NULL). Used for fixed property layout only. | any character | 0 | reservedCharacters | Defines a list of characters to be escaped automatically when the file is composed. | any character | {"/", "%", "&", "(", ")"} | composeEmptyAttributes
| Controls whether empty trailing attributes of data segments will be written during composition. | true/false |
| |
Flat File Complex Attribute (Class)
This class is used to divide fields into sub-fields. You can think of this like a FlatFileRecord placed within a single field.
Multiexcerpt |
---|
MultiExcerptName | FlatFileComplexAttribute |
---|
|
Attribute | Description | Allowed Values | Example |
---|
attributeLayout | Defines the attribute layout (fixed or separated) of the complex attribute. - Fixed: For property values that are shorter than the maximum length of the field, the field is filled with a fill character. As per default, this is blank space, but you can change the the fill character in attribute fillCharacter of the FlatFile class (see Attributes of Class FlatFile).
- Separated: If separated is used, specify the separator using attributeSeparator (see below).
| fixed | Fixed property layout. |
| separated | Separated property layout. |
| attributePattern | A RegEx pattern to parse the field content into a complex structure using capture groups. | a valid regular expression | ^(.?)(://)([A-Za-z0-9.])(:[0-9])(/.)$ |
| attributeSeparator
| Defines the property/field separator. | any character | Use the specified character as property separator. |
| <Tab> | Use tabulator as property separator. |
| comma (,) | Use the comma (,) as property separator. |
| suppressEscaping | Multiexcerpt |
---|
MultiExcerptName | suppressEscaping |
---|
| Boolean value to suppress escaping. |
| true | Property values of this property will not be un-escaped (parser) or escaped (composer) (default). |
| false | Escaping/un-escaping is not suppressed. | composeMacro | Multiexcerpt include |
---|
MultiExcerptName | macro |
---|
PageWithExcerpt | @self |
---|
| | any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(0) | parseMacro |
|
Flat File Group (Class)
This class is used to group multiple records into one (virtual) structure. A group does not have a representation in the flat file itself.
Multiexcerpt |
---|
MultiExcerptName | FlatFileGroup |
---|
|
Attribute | Description | Allowed Values | Example |
---|
composeMacro
| Multiexcerpt include |
---|
MultiExcerptName | macro |
---|
PageWithExcerpt | @self |
---|
|
| any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(AUTO0) | parseMacro
| evaluationOrder | Defines the order in which the association of the classes starting on same parent class must be processed. | any integer |
| pattern | Multiexcerpt include |
---|
MultiExcerptName | pattern |
---|
PageWithExcerpt | @self |
---|
|
| any character | ^Pattern.* | a valid regular expression |
|
Flat File Record (Class)
A class having this stereotype describes the properties of a flat file record. A record is one "line" in a file and can consist of multiple properties.
Multiexcerpt |
---|
MultiExcerptName | FlatFileRecord |
---|
|
Attribute | Description | Allowed Values | Example |
---|
pattern | Multiexcerpt |
---|
| A pattern to identify the record. The pattern is checked before the fields are separated. If no pattern is defined, all records will be parsed. |
| a valid regular expression | ^Pattern.* | attributeLayout
| Defines the property layout of the flat file record.
| fixed | Fixed property layout. For property values that are shorter than the maximum length of the field, the field is filled with a fill character. As per default, this is blank space, but you can change the fill character in attribute fillCharacter of the FlatFile class (see the Attributes of the FlatFile class above). |
| separated | Separated property layout. Specify the separator using attributeSeparator (see below). | pattern | Property layout is specified by a RegEx pattern in attributePattern (see below). | attributeSeparator | Defines the property/field separator. | any character | Use the specified character as property separator. | default | Comma (, ) | <Tab> | Use tabulator as property separator. |
| attributePattern | A RegEx pattern to parse the record content into the properties using capture groups. | a valid regular expression | ^(.?)(://)([A-Za-z0-9.])(:[0-9])(/.)$ evaluationOrder | attributeSeparator | Defines the | order in which the association of the classes starting on same parent class must be processed.any integerproperty/field separator. | any character | Use the specified character as property separator. |
| Comma (, ) | Use the comma (,) as property separator. | <Tab> | Use tabulator as property separator. | ignoreEmptyRecords | Boolean value for ignoring empty records. If set to true, no item will be generated, if none of the defined properties or sub records have any content. Info |
---|
Note, that a record containing only empty Strings is not empty – in opposition to a record composed from NULL s. See ignoreEmptyStrings below to skip processing of records containing only empty Strings. |
| true | Ignore empty records. |
| false (default) | Process empty records. | ignoreEmptyStrings | Boolean value for ignoring empty | string properties. If set to true, empty string values will be processed to NULL . Use this attribute in combination with ignoreEmptyRecords to skip processing of records | containing only empty Strings.true | Ignore empty string values. | false (default) | Preserve empty string values.lineNumber | Specifies the number of a record in the file. The first record is lineNumber=1, the second lineNumber=2, etc. | any integer | pattern | Multiexcerpt |
---|
| A pattern to identify the record. The pattern is checked before the fields are separated. If no pattern is defined, all records will be parsed. |
| any character | a valid regular expression | ^Pattern.* | suppressEscaping | Boolean value to suppress escaping. If suppressEscaping on a FlatFileRecord is true, FlatFileComplexAttribute that are part of this record will inherit this setting. | true | Property values of this record will not be un-escaped (parser) or escaped (composer) (default). |
| false
| Escaping/un-escaping is not suppressed. | parseMacrocomposeMacro | Multiexcerpt |
---|
| A macro that is executed while parsing/composing a file or complex field. This macro can contain multiple commands separated by commas or spaces. Macros on classes are executed before the processing of its properties or associations. The ID represents a counter. The following counters are available: - eight automatic counters with ID
AUTO0 .. AUTO7 - two automatic line counters with ID
LINE0 and LINE1 (parsing only) - unlimited custom counters with ID
CUSTOM0 .. CUSTOMx
Automatic counters are increased by 1 for each processed record. Custom counters have to be increased manually using the increase macro. All counters have the initial value of 0 when they process the first record. For more details on macro commands see Using Macro Expressions on Parsing or Composing a Flat File. |
| any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(AUTO0) | composeMacro | |
FlatFileGroup (Class)
This class is used to group multiple records into one (virtual) structure. A group does not have a representation in the flat file itself.
...
MultiExcerptName | FlatFileGroup |
---|
...
Multiexcerpt include |
---|
MultiExcerptName | pattern |
---|
PageWithExcerpt | @self |
---|
|
...
^Pattern.*
...
parseMacro | lineNumber | Specifies the number of a record in the file. The first record is lineNumber=1, the second lineNumber=2, etc. | any integer |
|
FlatFileSubRecord (Class)
Multiexcerpt |
---|
MultiExcerptName | FlatFileSubRecord |
---|
|
Attribute | Description | Allowed Values | Example |
---|
condition | A condition that must evaluate true if the record exists. The condition can refer to a self object which represents the current state of the parent. | any valid conditional expression | self.UNS.exists() |
| evaluationOrder | Defines the order in which the | associations association of the classes starting on same parent class must be processed. | any integer | offset | Define the position of this record in the flat file, starting with 0 for the first record and always relative to the parent element. | any integer |
| ignoreEmptyStrings | Boolean value for ignoring empty string properties. If set to true, empty string values will be processed to NULL . Use this attribute in combination with ignoreEmptyRecords to skip processing of records containing only empty Strings. | true | Ignore empty string values. |
| false | Preserve empty string values. |
|
Flat File Attribute FlatFileAttribute (Property)
Fixed Layout
Multiexcerpt |
---|
MultiExcerptName | FlatFileAttribute_fixed |
---|
|
Attribute | Description | Allowed Values | Example | externalLength | Number of characters of the field (only for fixed length records relevant). | any integer |
---|
suppressEscaping | Multiexcerpt |
---|
MultiExcerptName | suppressEscaping |
---|
| Boolean value to suppress escaping. |
| true | Property values of this property will not be un-escaped (parser) or escaped (composer) (default). |
| false | Escaping/un-escaping is not suppressed. | parseMacro | Multiexcerpt include |
---|
MultiExcerptName | macro |
---|
PageWithExcerpt | @self |
---|
| | any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(0) | composeMacro | padding | Defines the padding rule for the field from the left or right side. | left("<any character>")
right("<any character>")
| - Parsing: Ignore the specified character from the left/right side to the first different character.
- Composing: Fill the property from the left/right side to the first different character using the specified character.
| left("0") right(" ") | format | | any valid number or dateTime pattern | S9G999G990D00 %Y.%m.%d-%H:%M:% | order | The evaluation order of the properties. If offset is not used, order reflects the field number within the record. | any integer |
| offset | The character position of this field within the record. | any integer | padding | Defines the padding rule for the field from the left or right side. | left("<any character>")
right("<any character>")
| - Parsing: Ignore the specified character from the left/right side to the first different character.
- Composing: Fill the property from the left/right side to the first different character using the specified character.
| left("0") right(" ") | suppressEscaping | Multiexcerpt |
---|
MultiExcerptName | suppressEscaping |
---|
| Boolean value to suppress escaping. |
| true | Property values of this property will not be un-escaped (parser) or escaped (composer) (default). |
| externalLength | Number of characters of the field (only for fixed length records relevant). | any integer |
|
|
Separated Layout
Multiexcerpt |
---|
MultiExcerptName | FlatFileAttribute_separated |
---|
|
Attribute | Description | Allowed Values | Example |
---|
suppressEscaping | Multiexcerpt include |
---|
MultiExcerptName | suppressEscaping |
---|
PageWithExcerpt | @self |
---|
|
|
|
| false | Escaping/un-escaping is not suppressed. | parseMacro | Multiexcerpt include |
---|
MultiExcerptName | macro |
---|
PageWithExcerpt | @self |
---|
|
| any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(0) | composeMacro |
|
Separated Layout
Multiexcerpt |
---|
MultiExcerptName | FlatFileAttribute_separated |
---|
|
Attribute | Description | Allowed Values | Example |
---|
format | Multiexcerpt include |
---|
MultiExcerptName | format |
---|
PageWithExcerpt | @self |
---|
|
|
|
| order | The evaluation order of the properties. If offset is not used, order reflects the field number within the record. | any integer |
| offset | The relative position of the field in respect of the other fields in the record, e.g. field number 3 has offset = 2. | any integer | suppressEscaping | Multiexcerpt include |
---|
MultiExcerptName | suppressEscaping |
---|
PageWithExcerpt | @self | parseMacro | Multiexcerpt include |
---|
MultiExcerptName | macro |
---|
PageWithExcerpt | @self |
---|
|
| any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(0) | composeMacro |
|
FlatFileComplexAttribute (Property)
...
Flat File Sub Record (Property)
Multiexcerpt |
---|
MultiExcerptName | FlatFileComplexAttributeFlatFileSubRecord |
---|
|
Attribute | Description | Allowed Values | Example | attributeLayout | Defines the attribute layout (fixed or separated) of the complex attribute. - Fixed: For property values that are shorter than the maximum length of the field, the field is filled with a fill character. As per default, this is blank space, but you can change the the fill character in attribute fillCharacter of the FlatFile class (see Attributes of Class FlatFile).
- Separated: If separated is used, specify the separator using attributeSeparator (see below).
| fixed | Fixed property layout. | separated | Separated property layout. | attributeSeparator | Defines the property/field separator. | any character | Use the specified character as property separator. | <Tab> | Use tabulator as property separator. | attributePattern | A RegEx pattern to parse the field content into a complex structure using capture groups. | a valid regular expression | ^(.?)(://)([A-Za-z0-9.])(:[0-9])(/.)$ | suppressEscaping | Multiexcerpt |
---|
MultiExcerptName | suppressEscaping |
---|
| Boolean value to suppress escaping. |
| true | Property values of this property will not be un-escaped (parser) or escaped (composer) (default). |
---|
false | Escaping/un-escaping is not suppressed. | parseMacro | Multiexcerpt include |
---|
MultiExcerptName | macro |
---|
PageWithExcerpt | @self |
---|
|
any valid macro expression (see Using Macro Expressions on Parsing or Composing a Flat File) | GetCounter(0) | composeMacro |
|
Parameters
condition | A condition that must evaluate true if the record exists. The condition can refer to a self object which represents the current state of the parent. | any valid conditional expression | self.UNS.exists() | evaluationOrder | Defines the order in which the associations starting on same parent class must be processed. | any integer |
| offset | Define the position of this record in the flat file, starting with 0 for the first record and always relative to the parent element. | any integer |
|
|
Flat File Adapter Operations
compose
...
Operation
Multiexcerpt |
---|
MultiExcerptName | parameters_compose |
---|
|
Name | Type | Direction | Mandatory | Description | Allowed Values | Example |
---|
anyObjectFlow <any> | Any with FlatFile class stereotype | in | ![(tick)](/s/ayhbr5/8804/pkry9k/_/images/icons/emoticons/check.svg) | 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. |
|
|
Info |
---|
| If you provide both parameters, name and data, the FlatFile Flat File object will be written to the file system. |
|
...
parse
...
Operation
Multiexcerpt |
---|
MultiExcerptName | parameters_parse |
---|
|
Name | Type | Direction | Mandatory | Description | Allowed Values | Example |
---|
data | Blob | in | ( ) | 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.name | String | in | ( ) | 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 |
|
| 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 | ( ) | 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 | <any> | FlatFile class | out | ![(tick)](/s/ayhbr5/8804/pkry9k/_/images/icons/emoticons/check.svg) | 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. |
|
|
Info |
---|
| If you provide both parameters, name and data, the FlatFile Flat File object will be parsed from the file system. |
|
...