I have created a flat file dictionary which has a single Record Definition named (LINE) and extractor type Nth Field.
I created a flat file schema using this dictionary and set the properties as mentioned below:
When i run this schema with the sample output, it gives me proper result, i mean the values formed in the ffValues contain the double quote Expected output : “1”;;“2014-09-10”;;“Name”;“587”;“mtb”;“Anger”
Record Parser type: Delimiter
Record : Newline
Field or composite : [b]; /b
Starts at position zero (0)
I created a document from this schema I get the document with the below structure recordWithNoID
LINE
recordWithNoID
In my service
I have invoked the pub.flatFile:convertToString and i am passing my document to ffValues and entered the schema in ffSchema
The final string which is being formed doesn’t contain double quotes for every field. Please let me know what is the property which needs to be set to get the values in double quotes
Current output : 1;;2014-09-10;;Name;587;mtb;Anger
I have created the sample service. I have harcoded the input, the way i get in the document.(i.e without quotes). Kindly let me know if it is possible to get “” for every value wheni convert it to string. without using makeString for every mapping.
The requirement is when I do the converttoString, I expect the double quotes to be present in each columns.
For e.g
Input: A, B, C
Output after convertoString: “A”,“B”,“C”
I tried various option with the converttostring option, Tried setting up the escape character, release characters…
As a work around, I passed the quotes as part of the data, instead of expecting converttosting to do it. The other option I want to try is to use formatservice. I am not familiar with the formatsevice, hence didn’t try it yet.
Yes I don’t think converttostring will put the quotes in the output unless you set/concat it explicitly in the data itself or try with the FormatService template but it’s the same routine of having it explicitly putting the quotes and you call this FormatService in the FFSchema for each of the filed you created with in the dictionary/schema.