You can use a fixed-width flat file as a source or target in mappings and mapping tasks.
When you configure a Source transformation or Target transformation and select the fixed-width flat file type, you must select the most appropriate fixed-width file format to use based on the data in the fixed-width flat file.
Consider the following rules and guidelines for a fixed-width flat file:
•You cannot use a fixed-width flat file as a source or target for mappings in advanced mode and data transfer tasks.
•When you create a flat file target at runtime and select a fixed width file format, the Secure Agent ignores the fixed-width column boundaries that you specified for the fixed-width flat file format and applies the additional fixed width attributes for the new target object.
•When you write a column of Numeric data type from a fixed-width flat file source to an empty fixed-width flat file target that uses the same fixed-width file format, the Secure Agent appends a null character to the value in the Numeric column in the target.
•When you create a fixed-width file format, the sample file uses different characters as the new line symbol, depending on the operating system on which the Secure Agent is installed. Also, ensure that the source files use the same symbol.
- For a Linux machine, use the \n character as the new line symbol for the sample file.
- For a Windows machine, use the \r\n character as the new line symbol for the sample file.
•When you use a fixed-width flat file as a source or target, you cannot edit the metadata for the fields.
•When you read data of the datetime data type, you can read the date value only upto milliseconds.
•When you read data of the double data type from a fixed-width file and write the data to a Parquet or Avro file, the double data type is mapped to the decimal data type in target. Hence, the data is written incorrectly.
To write the data correctly to the target, edit the metadata in the Target transformation and change the decimal data type to double.
•When you create a fixed-width file format, ensure that the sample flat file only uses UTF-8 character set encoding.