Parsing a flatfile

Hi,

I am facing a problem while parsing a flatfile.

My flatfile has delimeter and field value same so its not parsing properly
The structure of Flatfile is with Record identifier.

hello,mical,sf,tea,12,000
hello,sonjan,sf,coffee,14,000
hello,prasnjan,sf,boost,16,000

Now the problem is that since the delimeter and the field value(12,000) is same so we are facing issue the
Result should be:
mical sf tea 12,000

so please let me know about it.

The most common approach is to enclose such fields with quotes. There are many resources on the web that describe this. The flat file adapter in wM IS supports this.

Can you please let me know the links to know how to work with the Flatfile and quote each field.

Please review the documentation. If you have any specific questions please post them.

Yes it can be done using quotes. But if possible, i would rather request the source which generates the flatfile to use “|” instead of comma delimiter. Because if you have user defined fields like names, street… etc. The probability of getting commas will be more random and whole parsing will go for a toss.

Cheers,
Niteesh

Its not a valid flat file if the comma (as data) doesn’t come with a release character. For that matter, any parser wouldn’t know what is separator and what is data unless you specify/instruct it. Refer flat file schema developers guide to know more about release characters.

-Senthil