Page 1 of 1

Getting Insert and Update rows count

Posted: Tue Jun 07, 2005 11:38 pm
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

Posted: Tue Jun 07, 2005 11:56 pm
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

Posted: Wed Jun 08, 2005 7:25 am
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)

Re: Getting Insert and Update rows count

Posted: Wed Jun 08, 2005 8:56 am
by kiran reddy
I think using the change capture stage will solve this.

Posted: Wed Jun 08, 2005 1:50 pm
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