Oracle stage Reject Link in Datastage

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
RohanSharma
Participant
Posts: 20
Joined: Sun Jan 28, 2007 10:06 pm
Location: Gurgaon

Oracle stage Reject Link in Datastage

Post by RohanSharma »

Hi All,



We have created a job like ODBC -> Transformer -> Oracle -> Transformer -> ODBC



In this job we have enabled the Output Reject Records option for rejected records and we want insert these rejected records into SQL Server table (as ODBC stage).



We have tried with all the below options, but in all the cases we are not able to get the rejected records.



1) In source we have taken the NULL value which is Primary key in target, here the record is not rejecting it is just dropping and giving the warning.

2) In source we have taken the Decimal value which is Numeric in target, here the record is not rejecting it is just inserting as 0 in target.

3) In source we have taken the more length value compare to target length, here the record is not rejecting it is just truncating the value and inserting in target.

4) In source we have taken the Varchar value which is numeric in target, here the record is not rejecting it is just dropping and giving the warning.



Please let me know what might be the reason for not getting the rejected records. And in which case we can get the rejected records except the above 4 cases.
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Oracle stage Reject Link in Datastage

Post by sachin1 »

hello,

just for testing i created an input file where i use a value of particular field which is more than the length described in database(oracle).

in transformer i use a constraint "REJECTED".

so the particular record which does not satisfy the precision or length is found in a sequential file or in a output link where a constraint is applied.

seqfile--------->T--------->oracle database
|
|
|
seqfile[/img]
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Sachin: Your method is valid in a server job and not in a parallel job.
RohanSharma: I do not see a reject link coming out of an ODBC stage? How exactly are you rejecting records? Does ODBC stage even support reject links :roll: ?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
chalasaniamith
Participant
Posts: 36
Joined: Wed Feb 16, 2005 5:20 pm
Location: IL

Post by chalasaniamith »

DSguru2B wrote:Sachin: Your method is valid in a server job and not in a parallel job.
RohanSharma: I do not see a reject link coming out of an ODBC stage? How exactly are you rejecting records? Does ODBC stage even support reject links :roll: ?


In ODBC Enterprise Stage there is an option ourput records reject option is available you can usse that option.Drag an output link from ODBC Enterprise Stage.Let me know if you need any moer information
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Ok. Then it works like other enterprise stages. Great. But I dont see that in the OP's design. The main issue here is, that RohanSharma needs to explain how he designed the job to handle rejects.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Best practice is to detect all knowable reject conditions before presenting rows to the database tables. It is much easier to deal with them if you do. You end up with a design that generates many fewer warnings, and then only when something unknowable (thanks Mr Rumsfeld) happens in the data or in the database.
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