Fixed File Input¶
Overview¶
The Fixed File Input operator converts each line in a file into multiple fields by character or byte of a configurable length.
Input and Output¶
Input: text file
Output: fields
Parameter Description¶
Parameter | Description | Type | Mandatory | Default Value |
---|---|---|---|---|
Line Delimiter | Line delimiter, which can be any string specified by users based on the actual situation. The OS line delimiter is used by default. | string | No |
|
Fixed length unit | Length unit. The options are char and byte. | enum | Yes | char |
Input fields | Information about input fields:
| map | Yes | None |
Data Processing Rule¶
The source file is split based on the input field length to generate fields.
If the field value does not match the actual type, the data in the line will become dirty data.
If the field split length is greater than the length of the original field value, the data split fails and the line becomes dirty data.
Example¶
The following figure shows the source file.
Configure the Fixed File Input operator to generate fields A, B, and C.
The three fields are generated, as shown in the following figure.