Getting Insert and Update rows count

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
Madhav_M
Participant
Posts: 43
Joined: Sat Jul 10, 2004 5:47 am

Getting Insert and Update rows count

Post by Madhav_M »

Hi,
We are basically writing into an Oracle Enterprise stage, source is Sequential file stage. We need to find out selected row count and seprate inserted row count and update row count into target table.

I think GetlinkInfo function is not feasible option to achieve this.. as this gives only the row processed through the link.

can anyone suggest anyother datastage function to achieve this?

Thanks
dsdesigner
Participant
Posts: 34
Joined: Thu Jul 29, 2004 1:03 pm

Post by dsdesigner »

I assume you are using an upsert mode in the current job and hence cannot identify the rows that you are inserting/updating. One option is, you can seperate the inserts and updates. Once seperated you can have two jobs, one that inserts and another that updates. This will allow you to use the GetLinkInfo

Thanks,
Shekar
lshort
Premium Member
Premium Member
Posts: 139
Joined: Tue Oct 29, 2002 11:40 am
Location: Toronto

Post by lshort »

The same thing can be accomplished in one job.
Use a lookup to determine which rows are inserts.
Then seperate your links...one for insert...the other for update.
The info you need will then be available. 8)
Lance Short
"infinite diversity in infinite combinations"
***
"The absence of evidence is not evidence of absence."
kiran reddy
Participant
Posts: 5
Joined: Wed Apr 20, 2005 6:29 pm
Location: USA

Re: Getting Insert and Update rows count

Post by kiran reddy »

I think using the change capture stage will solve this.
Thanks,
Kiran Kumar Reddy
richdhan
Premium Member
Premium Member
Posts: 364
Joined: Thu Feb 12, 2004 12:24 am

Post by richdhan »

Hi Madhav,

Use the CDC stage. It gives an additional column change_code which is used to identify insert, update, delete or exact copy. Pass the data from CDC to a transformer and using stage variables you can find the count of inserts, updates and total count.

HTH
Rich
Post Reply