When the schema contains elements of type Binary or Packed, the lenient
option does not allow short records, regardless of the last element’s
format type. When you set this property to true
, the validation applies only to cases in which the record ends with type Binary or Packed.
Fixed Width Format
MIME Type: application/flatfile
ID: flatfile
Fixed width types are technically considered a type of Flat File format, but when selecting this option, the Transform component offers you settings that are better tailored to the needs of this format.
Fixed width in DataWeave supports files of up to 15 MB, and the memory requirement is roughly 40 to 1. For example, a 1-MB file requires up to 40 MB of memory to process, so it’s important to consider this memory requirement in conjunction with your TPS needs for large fixed width files. This is not an exact figure; the value might vary according to the complexity of the mapping instructions. |
Configuration Properties
DataWeave supports the following configuration properties for this format.
Reader Properties
DataWeave accepts properties that provide instructions for reading input data in this format.
Parameter | Type | Default | Description |
---|---|---|---|
|
|
|
|
|
|
|
Error if required value missing.
Valid values are |
|
|
|
Fill character used to represent missing values. To activate a non-default setting, set the
|
|
|
|
Fills the entire group when the DEPENDING ON subject is not present. Introduced in DataWeave 2.3 with the August 2021 release of Mule 4.3.0-20210622. |
|
|
|
Expected separation between lines/records:
Note that schemas with type |
|
|
|
Schema definition. Location in your local disk of the schema file used to parse your input. |
|
|
|
Segment identifier in the schema for fixed width or copybook schemas (only needed when parsing a single segment/record definition and if the schema includes multiple segment definitions). |
|
|
|
Structure identifier in schema for flatfile schemas (only needed when parsing a structure definition, and if the schema includes multiple structure definitions) |
|
|
|
Truncate COBOL copybook DEPENDING ON values to the length used. Valid values are |
|
|
|
By default, the flat file reader and writer use spaces for missing characters and ignore the setting of the |
|
|
|
Use the |
Writer Properties
DataWeave accepts properties that provide instructions for writing output data in this format.
Parameter | Type | Default | Description |
---|---|---|---|
|
|
|
Size of the buffer writer. |
|
|
|
When set to |
|
|
|
Encoding to be used by this writer,
such as |
|
|
|
Error if a required value is missing.
Valid values are |
|
|
|
Fill character used to represent missing values. To activate a non-default setting, use
|
|
|
|
Fills the entire group when the DEPENDING ON subject is not present. Introduced in DataWeave 2.3 with the August 2021 release of Mule 4.3.0-20210622. |
|
|
System property |
Record separator line break. Valid values:
Note that in Mule versions 4.0.4 and later, this is only used as a separator
when there are multiple records. Values translate directly to character codes.
( |
|
|
|
When set to |
|
|
|
Schema definition. Path where the schema file to be used is located. |
|
|
|
Segment identifier in the schema for fixed width or copybook schemas (only needed when writing a single segment/record definition, and if the schema includes multiple segment definitions). |
|
|
|
Structure identifier in schema for flatfile schemas (only needed when writing a structure definition and if the schema includes multiple structure definitions) |
|
|
|
Trim string values longer than the field length by truncating trailing characters. Valid values are |
|
|
|
Indicates whether trim values are longer than the field width. Valid Options are |
|
|
|
Truncate COBOL copybook DEPENDING ON values to the length used. Valid values are |
|
|
|
By default, the flat file reader and writer use spaces for missing characters and ignore the setting of the |
|
|
|
Use the |