Split big column into records

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
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Split big column into records

Post by getsatish_gk »

I have a one column which has
id,tax_input,tax_amt,tax_address | id,tax_input,tax_amt,tax_address

I want to split this into records based on delimited '|'
id,tax_input,tax_amt,tax_address
id,tax_input,tax_amt,tax_address

this should happen on dynamically based on '|' as record separator.
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

Which version of datastage you are in.?
prasson_ibm
Premium Member
Premium Member
Posts: 536
Joined: Thu Oct 11, 2007 1:48 am
Location: Bangalore

Post by prasson_ibm »

I am assuing you are in 8.5 or above version,you can check below post,I have given solution,you need to apply only one transformer,check only logic for tsfm2

viewtopic.php?t=149150
bob7027
Participant
Posts: 22
Joined: Wed Oct 03, 2012 2:49 pm
Location: United States

Post by bob7027 »

getsatish_gk : use field option for '|' in transformer, then use Pivot stage to convert into rows
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If the source file is a text file, you could use a Filter command such as sed or awk to convert the pipe delimiters into line terminators. (Even though you are on Windows, the MKS Toolkit provides these commands.)
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