You can use this connection:
- In Enterprise Designer for reading and writing data
- In Metadata Insights to create physical models
-
Go to .
-
By default, the screen opens in the create mode. Otherwise, click to add a new Flat File connection.
-
Enter a Connection Name for the Flat File data
connection.
-
Enter the File Path by clicking
Browse and selecting the directory of the file.
-
Select the Character Encoding of the flat file from the
drop-down.
-
Select the Record Type as Fixed
Width.
-
In the Record Length field, enter the total number of
characters in a file record.
Repeat Step 8 to Step 13 to enter details of all fields expected in a file
record.
-
Click Add Field to add a row for a field in a file
record.
-
In the Name column, enter the name for the field
value.
-
In the Type column, select the data type of the field
value.
-
In the Start Position column, enter the position in the
file record at which of the field value begins.
For the first field in a file record, the Start
Position counting begins from 1.
-
In the Length field, enter the total number of
characters the field covers, including the character at the Start
Position.
The sum of the Start Position and
Length values for any field should be less than or
equal to the Record Length
If the File Record is:
01234Rob Smith29PitneyBowes
Record
Length = 27
For the field 'Name':
Start
Position = 6
Length =
9
Name = Rob Smith
-
Check the Trim checkbox if you wish to trim any white
spaces at the beginning and/or end of a field value.
-
Click Test.
A message confirms the successful test of the connection.
-
Click Save.
A message confirms the successful creation of the
connection.
In order to view a sample record fetched using the created Fixed Width Flat File
connection, click Preview in the header bar. File records will be
fetched and the Fields sorted according to the details provided by you.