Issue with pipe delimeter

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
krisna
Participant
Posts: 77
Joined: Tue Apr 08, 2008 11:33 pm

Issue with pipe delimeter

Post by krisna »

Hi,

I had a requirement, where my source is a sequential file and it is pipe delimited. In source file description column has a value with pipe.

for example : second_column has value car|care

record looks like this

1|car|care|UK

where car|care is a single column value.

Problem here is when it is reading it is treated as two separate values, where as it should be a single column value.

ie first_column = 1
second_column = car|care
third_column = UK

Looking for a solution.

Thanks in Advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There isn't one unless each string field is quoted.

You can read the entire line as a single string and parse it according to your own rules, for example in a Transfomer stage.

This will actually give improved performance for large volumes because your parsing is being performed in parallel rather than sequentially.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right - get the source file corrected, right now it is invalid.

1|"car|care"|UK
-craig

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