Capturing deleted hashed records 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
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Capturing deleted hashed records count

Post by ASU_ETL_DEV »

Hello,
I have a job that deletes hashed file records using a UV stage. I would like to take a count of the records that will be deleted but I do not like the solution of a SELECT COUNT(*) before the DELETE. I would like to know whether there is a way of capturing the count of the deleted records as a result of the same SQL DELETE operation on the hashed file (like the automatic count that is shown at the end of a SQL DELETE against a relational database).
Thanks
ASU Developer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

DataStage/SQL does report N records deleted when a DELETE statement is executed interactively. Does not this report appear in the job log?

It is not possible to take a count of the records that "will be" deleted without counting beforehand.

DataStage ("UniVerse") tables are relational. You can choose whether or not to enforce first normal form.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Post by ASU_ETL_DEV »

Yes, I have seen that the log does not report a message of the deleted records' count but I had hoped that there might be an option to actually have it report it. That way I could have gotten it from the log instead of running an extra SELECT COUNT(*).
All right, thanks.
ASU Developer
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Capturing deleted hashed records count

Post by chulett »

ASU_ETL_DEV wrote:(like the automatic count that is shown at the end of a SQL DELETE against a relational database).
For the record, I have yet to use a relational database where a sql delete reported anything back automatically. Some may, but all certainly don't.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ASU_ETL_DEV
Premium Member
Premium Member
Posts: 43
Joined: Tue Sep 09, 2008 1:56 pm

Post by ASU_ETL_DEV »

You are right, my mistake.
ASU Developer
Post Reply