how do you know that all the rows with the same group id has already come? transformer can store the row and return null till you collect all the rows and then you may return one consolidated row. But the problem is it does not know when the row ends.
you can override the SqlEntityProcessor and just override the nextRow() this should do the trick On Fri, Oct 30, 2009 at 1:52 AM, Lucas F. A. Teixeira <lucas...@gmail.com> wrote: > Hello all, > > Is it possible to have my own implemented transformer that generates some > output data from data of 2 different rows? > My intention is to generate pre-processed HTML from a set of rows. > > Eg. > > SQL RESULT: > GROUP | ITEM_ID | DESCRIPTION > 1 | 8 | desc1 > 1 | 23 | desc2 > 1 | 563 | desc3 > 2 | 43 | desc4 > 2 | 3222 | desc5 > > And with this result, build a Transformer to group all entries in the same > group and build a html using them. My idea in the final index is to have 2 > docs with > > <DOC> > * id=1 > * content = "<ul class='1'><li class='8'>desc1</li><li > class='23'>desc2</li><li class='563'>desc3</li></ul>" > > > <DOC> > * id=2 > * content = "<ul class='2'><li class='43'>desc4</li><li > class='3222'>desc5</li></ul>" > > > I've builted some custom transformers before, but never using data from > different rows. > > If this is not possible with transformers, how can I achieve this? > > Thanks! > > > > > Lucas Frare Teixeira .·. > - lucas...@gmail.com > - lucastex.com.br > - blog.lucastex.com > - twitter.com/lucastex > -- ----------------------------------------------------- Noble Paul | Principal Engineer| AOL | http://aol.com