cancel
Showing results for 
Search instead for 
Did you mean: 

text delimiter problem

Former Member
0 Kudos

I am creating a .csv file from the following data:

<Record>

<field1>Bearing</field1>

<field2>3.2" height, 2.1" weight</field2>

</Record>

Instead of two columns, this creates 3 columns due to the comma in the text of field2.

If I include a mapping to enclose in quotes (") and include a content conversion parameter ( Record.enclosureSign = " ), because there is " in the text, this still splits the text into multiple columns.

How to handle this so that any text in field2 (regardless of special characters) goes entirely into second column of output .csv file?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi James,

It will split in three fields as you are using the comma as fieldSeperator and in your output there will be comma between the text of Field2 thus even if its in reality single field, It will look like having the three fields.

Probably you need to handle it while the file is getting read on the receiver end by further application.

OR better way will be to use the field seperator charset which will not be usedin the Output payload.

The characters such as @, #, $ etc but have to make sure that these chars will not be repeated in the Output payload values

Thanks

swarup

Former Member
0 Kudos

Hi James,

I think its creating two columns only,but as there is ,(comma) in the data it might be looking like three columns.

Bearing,(delimiter)3.2" height,(comma in Data) 2.1" weight

so for looks it is looking like three columnd,but in fact it has two columns.

but in general we have to avoid ,(comma) in data when we are using CSV format.

hope that helps a bit.

Sri

justin_santhanam
Active Contributor
0 Kudos

James,

Could you paste here the output which u've got?

raj.