Page 1 of 1

Split big column into records

Posted: Tue Mar 12, 2013 11:55 am
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.

Posted: Tue Mar 12, 2013 12:25 pm
by prasson_ibm
Which version of datastage you are in.?

Posted: Tue Mar 12, 2013 12:30 pm
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

Posted: Tue Mar 12, 2013 12:34 pm
by bob7027
getsatish_gk : use field option for '|' in transformer, then use Pivot stage to convert into rows

Posted: Tue Mar 12, 2013 3:36 pm
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.)