count the number of inserts

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
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

count the number of inserts

Post by dodda »

Hi

i have a requirement where i need to read a fixed width flat file and insert the rows into a oracle DB. My input File has detailed records and Footer record. records will be inserted into database based on some constraints.
I need to capture the no of records that got inserted and that number has to be inserted into a Database. Need your help on how to capture the records and insert them into a database.

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Really depends on how you are identifying your inserts, if its predetermined and all you are doing is inserting records then you can get the link count. Search for several methods discussed here.
If its insert/update then you could do a count(*) on your target table after the inserts.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Hello DSGuru

The number of inserts vary as we will do some constraint check just before we do insert into database. i want to write number of records that got inserted to a file and in the next job i will read that file to get the number of records that got inserted.

thanks
dodda
Premium Member
Premium Member
Posts: 244
Joined: Tue May 29, 2007 11:31 am

Post by dodda »

Hello Guru,

Is there a way i can get and write the Job start time, endtime, Status, no of records inserted into a file

Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, unless you timestamp or otherwise identify the run, and count the table beforehand and afterwards.

In DataStage you can only count the number of rows SENT to the database server - whether they get inserted successfully or not is a different question.

Download ETLstats, which already exists and will do most of the process metadata capture for you.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply