how to capture the no of records inserted and updated

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
prams
Participant
Posts: 73
Joined: Mon Apr 02, 2007 11:26 pm

how to capture the no of records inserted and updated

Post by prams »

Hi All

I have a requirement like, need to take no of records inserted and updated and rejected if records are not inserted then i need to take '0'(zero) records inserted into audit cycle table.


at presently i am using agg stage i am able get the count of inserted and updated

but in case source is having zero records then it not giving any count but

i need to insert into aud cycle table as '0' records inserted.

please help me in this regard.how to get if in case souce is having zero records. which design i need to follow.

Thanks in advance
Prams
girija
Participant
Posts: 89
Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford

Post by girija »

Add a row generater with three column Type INS Priority 2 and Count 0
After your aggr stage add a funnel and put these twwo link.
After funnenl add remove duplicate based on Type and priority desc.
If nothing comes from Aggr it has only one row, but if something coming from Aggr then it will take the row from aggr and remove the data from row generater.

Girija S
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You could take a look at ETL stats (do a search for it) or generate your own job stats and process the XML stats file yourself. This gives you all rows counts in your job after the job has finished. An accurate way to find row counts.
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

You could take a look at ETL stats (do a search for it) or generate your own job stats and process the XML stats file yourself. This gives you all rows counts in your job after the job has finished. An accurate way to find row counts.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Follow my link below my sig. On my tips page.
Mamu Kim
kandyshandy
Participant
Posts: 597
Joined: Fri Apr 29, 2005 6:19 am
Location: Singapore

Post by kandyshandy »

Did u try "If IsNull(#countfield from aggr#) Then 0 Else #count field from aggr#" ??
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What does it matter what U tried? U did not ask the question.

The second person personal pronoun in nominative case is spelled "you" in English, not "u". Please strive for a professional standard of written English on DSXchange.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
prams
Participant
Posts: 73
Joined: Mon Apr 02, 2007 11:26 pm

Post by prams »

girija wrote:Add a row generater with three column Type INS Priority 2 and Count 0
After your aggr stage add a funnel and put these twwo link.
After funnenl add remove duplicate based on Type and priority desc.
If nothing comes from Aggr it has only one row, but if something coming from Aggr then it will take the row from aggr and remove the data from row generater.

Girija S

Thanks for the reply, is is working fine but Remove duplicate giving warings like:
"Remove_Duplicates: When checking operator: User inserted sort "Remove_Duplicates.DSLink52_Sort" does not fulfill the sort requirements of the downstream operator "Remove_Duplicates"
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which has been asked and answered before. Search for "does not fulfill the sort requirements of the downstream operator".
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply