Page 1 of 1

number of records written to a link

Posted: Thu Apr 14, 2005 10:54 am
by garirt
Hi,

In a transformer stage, I have two output links. One writing to a hash file(link1) and another to update a table(link2).
I want to update the table with the number of records written to link1 in the transformer. I want to do this after all
the records are written to the link1. Any ideas how I can accompilsh this ?

thanks,
nrc

Posted: Thu Apr 14, 2005 11:01 am
by ml
You just want the "number of records written to link1" i think you can use the @OUTROWNUM variable. But if you need this at tthe end you should load the hash file first :roll:

Posted: Thu Apr 14, 2005 12:03 pm
by nsm
I feel better is have a different job to read the LinkInfo from this job and updates the table.

If you do as ml told you its gonna be multiple updates instead of one update..

nsm.

Posted: Thu Apr 14, 2005 1:07 pm
by chulett
Run your second link to an aggregator first and then to the update. Send a numeric field set to 1 for every row that goes down the first link or a 0 for any rows that don't... either that or have them use the same constraint. Then just do a 'sum' in the aggregator.

If there are no constraints involved you can also send @OUTROWNUM down it and let the aggregator take the 'Last' or 'Max' value.

Posted: Thu Apr 14, 2005 4:50 pm
by garirt
Thx for all the help. I got what I wanted using the aggregator.