Hi,
I have a requirement to split the sub records. Input contains following fields.
Col1 ->a1|a2|a3
Col2 ->abc
Col3->10
My output should be:
col1 col2 col3
a1 abc 10
a2 abc 10
a3 abc 10
I achieved this by using a transformer. But my col1 may contain upto 50 delimited values,which resluts in 50 links to transformer, so I was asked to go for an alternative approach. Can anyone suggest me an alternative approach to achieve this.
Thanks
split records
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Appreciate your response. It works but we are not sure of the maximum columns to split. If we know the maximum value then we can split into so many columns and use pivot but we don't know the max value. I should have mentioned this while posting but I apologize for that. Is it a good way to form the incoming record into a vector and then use split sub vector. Will this work in this case?
Thanks
Thanks
You have to create a buildop where you have to count the number of delimiters and then spit out as many records as required.
Last edited by sud on Thu Jul 24, 2008 8:30 am, edited 1 time in total.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: