double quotes in data

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

double quotes in data

Post by dnat »

Hi,

I have double quotes in data and ds is not recognizing the field

Data looks like this

xxx,yyy,"last,first", "yyyy""",jjj

This is a .csv file and I have given the quote character as double quote.

This record is not being read in sequential file at all, so If I could read this I can strip the extra double quotes inside datastage.

Thanks!!
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You do not have double qoute in all fields.
Have the quote character as None and import the data.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
dnat
Participant
Posts: 200
Joined: Thu Sep 06, 2007 2:06 am

Post by dnat »

But, when I have comma in a field, then I get them in quoted fields

xxx,yyy,"last,first", "yyyy""",jjj

Here the 3rd field is "last,first". If I have the quote as none, then it is considering the third field as last and not reading properly..
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You might want to consider using a Server job for this, they are typically much more forgiving when it comes to reading files of this nature. That or leverage the Server Sequential File stage in a Server Shared Container in your PX job.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply