Datastage job not throwing warnings on foreign key violation

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
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Datastage job not throwing warnings on foreign key violation

Post by Pravenai »

Hi,

I created a simple parallel job having three stages:
1) Input - Oracle enterprise stage
2) Transformer
3) Output - Oracle enterprise stage

This job fetches data from a source table and deletes the data from the target table. I have used auto generated delete statement in the target stage.
The delete happens on the primary key value.

I ran he job for a single record. This record was not deleted from the target and it got rejected. In the log statistics I saw the record as rejected. But the job had no warnings.

The reason of rejection was there are some foreign key constraints which prevented this record from being deleted in the datastage job. However my question is datastage doesnot throw up any warnings on foreign key violations? Does it simply reject the record without any warnings?

Is there any environmental variable that would help in my case?

Thanks for the help.

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

Post by ray.wurlod »

If you capture the reject in a reject link the reject link can also be populated with the error code and error text.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Post by Pravenai »

I can capture that through a reject link to a file or dataset. But that would mean this reject file has to be monitored after every run.

My question is can we get the information as a warning in the datastage logfiles itself that a record has been rejected because of foreign key violation? Is this the normal behaviour in case of oracle stage where a record is silently rejected even in case of failure to write into a table?

regards,
PR
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Post by Pravenai »

I just checked, we cannot use a reject link to an oracle enterprise stage while using delete option. I am using 8.1 version.
Pravenai
Participant
Posts: 49
Joined: Mon Apr 06, 2009 1:32 am
Location: USA

Post by Pravenai »

I checked the same thing using a server job and it is throwing up warnings which is what I am looking for.

Cannot we have the same functionality in parallel jobs i.e. we get a warning in case of rejected records for deletes?

Thanks for the help.

Regards,
PR
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Double-check with your official support provider. You may need to upgrade... or perhaps use the Connector stage. Or both.
-craig

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