Unable to get the rejected records from oracle enterprise st

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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change the array size to 1 to get correct error reporting.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Of course your Oracle DBA's may come out and lynch you if the table is really large...
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
ragunathan13
Participant
Posts: 50
Joined: Mon Sep 25, 2006 11:18 pm
Location: Chennai
Contact:

Post by ragunathan13 »

I changed the array size as 1 and now it is throwing the below error

Target_Oracle_Entp,0: Open failed for insert:
insert is: <<insert SQL statement >>
sqlcode is: -2290
esql complaint: ORA-02290: check constraint (Target table constraint) violated

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

Post by ray.wurlod »

So now you know what the actual error is. The INSERT statement may suggest which actual CHECK constraint was violated; or there may be more information in the job log or in the Oracle logs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Does your reject link have sqlcode column? Does your reject link or your job have a limit on the number of rows/warnings handled?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ragunathan13
Participant
Posts: 50
Joined: Mon Sep 25, 2006 11:18 pm
Location: Chennai
Contact:

Post by ragunathan13 »

Yes reject link is having sqlcode column, but no limitations for warnings/rows in job as well as reject links.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

They're rejected for a reason and that reason is logged, regardless. A 'cheat' would be to demote what you don't want, better to fix the job and (gasp) not violate the constraint. Any reason you can't do that? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

rangunathan13,

Let me be a bit more specific about what Craig advised.

The best way to resolve this is to determine what constraints are on the table at a database level and include tests in your job to check each record and route the rejects to a file before they are written to the table.

This would also allow you to set array size back to something more reasonable since you wouldn't need to trap the rejects coming back from the table.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Exactly - logical rather than physical rejects. No job should ever knowingly violate a constraint on a table and thus should not only be aware of them all but attempt to ensure compliance with them before sending the record to the database.
-craig

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