Reputation: 107
I have a requirement to read data from flat file which has free text data in it(i.e. column length for each column is 32000 and there are 8-9 columns in the file) . As the columns have free text data, so users can add any value in the data which can violate the delimiter in case i define the delimiter in the informatica map. Also as the field length at source level are huge, it would not be easy to use fixed width property.
Can please someone help me in here, is there any way i can define delimiter in fixed width property???
example of data:
Column1| Free Text field1| free text field2| John| how old are you? where do you live?| Gender Male|Female, Working : Yes|no
Upvotes: 0
Views: 2519
Reputation: 1
You have 9 columns, each column size is 32000, Your fixed file definition should have 1-32000|32001-64002|......|, After loading the flat file you should truncate the right or left spaces.
A Fixed Flat file will have a fixed columns length, You can't specify any delimiter in fixed format,If you do, then it's not a fixed file format anymore.
Thanks MKrishnan
Upvotes: 0
Reputation: 3353
One way is to use a complex, multicharacter delimiter. I'm not sure if you can enforce this at source.
Upvotes: 0
Reputation: 630
In the example you provide you started out by having pipe as the delimeter and then someone decided to use pipe to specify alternate values... this leaves you with the choice of either developing complex code workarounds to accommodate those exceptions (e.g. tokenise the known exceptions before reading the flat file into informatica and then untokenise them later on in the mapping ) or the political task of getting agreement from the design space to refrain from using pipe to represent alternative choices ( can use / instead) and put validation on the freetext input fields to disallow the pipe character (also some amendment to existing templates for preventing these being entered in)
Upvotes: 0