Page 1 of 1

Oracle stage Reject Link in Datastage

Posted: Wed Jun 20, 2007 12:14 am
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.

Re: Oracle stage Reject Link in Datastage

Posted: Wed Jun 20, 2007 9:08 am
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]

Posted: Wed Jun 20, 2007 9:50 am
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: ?

Posted: Wed Jun 20, 2007 3:11 pm
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

Posted: Thu Jun 21, 2007 7:04 am
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.

Posted: Thu Jun 21, 2007 3:43 pm
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.