Page 1 of 1

Count of records processed

Posted: Mon Oct 11, 2010 2:03 pm
by highpoint
Hi,

My source is Sequential file.

Target is a dataset and ODBC(oracle table).

All the records that meet conditions in source file are processed and loaded in dataset.

The odbc stage(oracle table) should be loaded with the count of number of records that made to dataset.

I am not getting idea to do this.

Help is appreciated.

Posted: Mon Oct 11, 2010 2:10 pm
by vinothkumar
Add one dummy column(Value=1) while writing into datasets and group by based on that dummy coulmn to get the count.

Posted: Mon Oct 11, 2010 10:43 pm
by Gopinath
vinothkumar wrote:Add one dummy column(Value=1) while writing into datasets and group by based on that dummy coulmn to get the count.
You should have a dummy column in the transformer and aggregate based on dummy column, which will give you the count of records. But what will you do if none of the records meet the conditions, in this case you wont get the count as 0, instead what you have to do is, have a another link (new), create a link with count as 0, so that if there is a value coming from the actual link then you need to pick that else ypu need to pick the count (0) created by you in the new link.

Hope this will help you..!!!

Posted: Mon Oct 11, 2010 11:05 pm
by dsa
use wc -l