Page 1 of 1

Is RCP works with Aggregator ?

Posted: Thu Nov 29, 2007 7:33 am
by swapnilverma
Is RCP( Run time Column propagation) works with Aggregator ?
I want all the columns of my input to be present in output too.

I know we can do the same by using join. I do not want to use it.
Any other way ?

I tried with RCP but no luck...

any help will be great :-)

Posted: Thu Nov 29, 2007 11:11 am
by ZDC
if RCP is used for Aggregator stage only those column will go to output , which are there in the mapping tab of aggregator on the left side(left side on the mapping tab).I have tried it once with sequential file as input to aggregator and sequential file as output to aggregator.

Is this interview question??? :wink:

i hope this will help.

Cheers,
ZDC

Posted: Thu Nov 29, 2007 2:21 pm
by ray.wurlod
Think about it in SQL terms. What are the rules in SQL? Every column named in the SELECT clause, if there is a GROUP BY clause, must either be mentioned in the GROUP BY clause or have a set function applied to it.

A column propagated via RCP would meet neither of these conditions.

Therefore it would be illegal if it were possible.

Therefore it is not possible.

QED

Posted: Fri Nov 30, 2007 12:13 am
by swapnilverma
Thanx for the replying... it helps...
BTW its not an interview Question... it is a practical problem I faced in my project...

can you think any other way we can acheive this ?

Posted: Fri Nov 30, 2007 12:20 am
by Maveric
Do an exact search on "aggregator". This has been answered before. You would have to use Sort, Copy and Join stages along with Aggregator stage to get all the columns and the calculated field.

Posted: Fri Nov 30, 2007 2:45 am
by ray.wurlod
It's usually called a "fork join" design.