Count of records processed

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
highpoint
Premium Member
Premium Member
Posts: 123
Joined: Sat Jun 19, 2010 12:01 am
Location: Chicago

Count of records processed

Post 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.
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

Add one dummy column(Value=1) while writing into datasets and group by based on that dummy coulmn to get the count.
Gopinath
Participant
Posts: 52
Joined: Wed Apr 25, 2007 2:18 am
Location: Chennai

Post 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..!!!
Gopinath
dsa
Participant
Posts: 37
Joined: Sun Oct 10, 2010 7:52 am

Post by dsa »

use wc -l
Post Reply