Page 1 of 1

Row Splitter Help !

Posted: Tue Jul 26, 2005 7:26 am
by vinaymanchinila
Hi,
I have to split more than 1 row from the source data comming from single Oracle stage, I ahve used Row Splitter and it works great for one row, how do I go about for more than 1 row!
Thanks a lot

Posted: Tue Jul 26, 2005 7:29 am
by Sainath.Srinivasan
Convert them into a single row.

Posted: Tue Jul 26, 2005 7:35 am
by vinaymanchinila
Hi Sai,
The source is like
'Date1,Center1,City1'
'Date2,Center2,City2'
...
'DateN,CenterN,CityN'

I am splitting the row based on the delimiter "," and how do I concatenate all the rows into one column ! It is a SQL Query that returns the rows like this and I have no fixed number of records.

Thanks,

Posted: Tue Jul 26, 2005 2:43 pm
by vinaymanchinila
Hi,
I got this to work by using RowSplitter followed by a Pivot Stage!

Posted: Tue Jul 26, 2005 2:55 pm
by tzor
One of our consultants had a interesting trick to combine the rows, basically use a transformer with a stage variable to create an ever growing concatenated string followed by an aggregator stage with a LAST function to get the final concatenated value as a single row.

Posted: Tue Jul 26, 2005 5:50 pm
by changming
vinaymanchinila wrote:Hi Sai,
The source is like
'Date1,Center1,City1'
'Date2,Center2,City2'
...
'DateN,CenterN,CityN'

I am splitting the row based on the delimiter "," and how do I concatenate all the rows into one column ! It is a SQL Query that returns the rows like this and I have no fixed number of records.

Thanks,
Just to answer the question how to concatenate all the rows into on clolumn:
read the flate file using delimeter other than ",", such as TAB.

Posted: Wed Jul 27, 2005 4:20 am
by Sainath.Srinivasan
Can you explain what you expect to do with the rows. The rows appear to represent on set each. So why do you say your information spans across rows?

Posted: Wed Jul 27, 2005 7:33 am
by vinaymanchinila
Hi,
I get the Date column only from which I derive Date2 , Date3...DateN

Posted: Wed Jul 27, 2005 7:51 am
by Sainath.Srinivasan
What about Center and City columns?

Posted: Wed Jul 27, 2005 7:53 am
by vinaymanchinila
Those columns go with all the other columns, I mean I extract it once but use it every data set.

Thanks

Posted: Wed Jul 27, 2005 7:55 am
by Sainath.Srinivasan
In that case, I think you need stage variables and not row splitter.

Posted: Wed Jul 27, 2005 7:58 am
by vinaymanchinila
I guess, but it is working fine with the row splitter and also the performance is good so leaving it there for now.

Thanks for looking into it Sai