How to read a Fixed Width file

The image below is an example of the data that is in a fixed width file (text file).

image

Illustrated below is the configuration that is available in the Fixed Width reader step. There is no header in the file, so the Header Length is set to 0. For the Fields section, the fields path have to be in the order the data in the fixed width file is. To add a field, click on the highlighted plus icon, fill in the details and click on the tick on the far right of the field. The Length field is the length of the characters that’s in the data, the To Path field is the name you want to give the field, the Type field is the datatype of the field and the Format field is the format you want to give for the value such as a date format. For the Row Delimiter field, you can select the required character that indicates the end of a row or you can leave it blank if there’s no row delimiter in the file. The End Of File Delimiter indicates the character that is at the end of the file.

The below image is the output of the data.

image