Page 1 of 1

count the records in stage

Posted: Wed Jan 24, 2007 1:36 pm
by Poonam Singh
Hi all,



In my one of job I have 3 stages

ODBC stage, transformer stage then sequential_file stage
DSLink3 joins ODBC stage to transformer stage and
DSLink4 joins transformer to sequential_file stage.

Is that possible I can use 4th stage to count records which is going
into seqential_file stage from transformer stage.

I know I can do it in job control with DSGetLinkInfo function.

Posted: Wed Jan 24, 2007 1:44 pm
by ray.wurlod
In a server job you can add a fourth stage, to dispose of the count (for example a Sequential File stage). You can form the count in an Aggregator stage.

Posted: Wed Jan 24, 2007 1:47 pm
by DSguru2B
Add two more columns in your aggregator with derivation @INROWNUM for the count and a dummy key for the other.Feed it to the aggregator, grouped on the dummy key and Last for the count column.

Posted: Wed Jan 24, 2007 1:56 pm
by chulett
Or just one column with any non-null value from your feed and Count it.

Posted: Wed Jan 24, 2007 3:08 pm
by DSguru2B
chulett wrote:Or just one column with any non-null value from your feed and Count it.
Actually this is a better way.