Page 1 of 1

Alternate option to DSGetLinkInfo

Posted: Sun Oct 24, 2010 1:43 pm
by yaminids
Friends,

Currently I'm working on a task which requires me to update the log table with the number of records processed each time the job is executed.

The design of the job is quite simple. It extracts data from 2 tables in the source db and writes to 2 tables in the destination db

STBL1==>Transformer1==>DTBL1
STBL2==>Transformer2==>DTBL2


The requirement is to update the log table with the number of records extracted from the source and written to the destination db.

I wrote a custom routine which uses "DSGetLinkInfo". But the problem is that I have wait for the completion of the job to invoke the custom routine to get the number of records processed in the link.

Is there any other way to get the number of records processed through a link from within the job

Thanks
Yamini

Posted: Sun Oct 24, 2010 5:13 pm
by ray.wurlod
Yes, but you have to wait to the end anyway to get the correct count.

The value of system variable @OUTROWNUM will be correct in the final row. Indeed it will be correct at all times on all output links.

Posted: Sun Oct 24, 2010 5:32 pm
by chulett
Typically one would use an Aggregator to get this kind of count 'in job'. You can count rows or max the rowcount that Ray mentioned, then sent it to your target.

Posted: Sun Oct 24, 2010 7:21 pm
by yaminids
Thanks Ray.
Can you please explain how I can get the max value by using @OUTROWNUM

Thanks
Yamini

Posted: Sun Oct 24, 2010 8:47 pm
by chulett
The last value will be the max value... so, an Aggregator set to Last or Max would be one solution.

Re: Alternate option to DSGetLinkInfo

Posted: Mon Oct 25, 2010 12:25 am
by Pacific007
Hi Yamini,

It is not possible to get details before finishing the job. You can use DSJobreport afterjob subroutine to get any kind of details depends on the parameters you pass in the subroutine.

How this will help you...