delemeter , ans required

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
raju4u
Participant
Posts: 56
Joined: Thu Dec 13, 2007 12:30 am

delemeter , ans required

Post by raju4u »

Hi
i have a situation,
I have 3 coloumns
no,name,salary
1,raju,100
2,rani,10,000
3,reddy,10,00,00

The problem is ,in the thirds coloumn after 2 digits it is separated by ",",it is treated as separate coloumn ,so how we can handle this situation ?
N R REDDY
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Make sure the file gets created properly... the salary information will be valid only if quoted - "10,000" for example, or have those inner commas removed.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Maveric
Participant
Posts: 388
Joined: Tue Mar 13, 2007 1:28 am

Post by Maveric »

If you have no other way around it, then you can read the data from the file as single field and then format it into 3 columns in a transformer.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

To paraphrase Craig's post, your data break the rules for a CSV file. If a data field contains delimiter characters, then that data field must be quoted.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply