Hi,
I am still on the learning phase in datastage and I have a doubt with datastage lookup stage.
I want to capture only the reject rows and I don't want to do anything with the correct matching rows.
I have a parallel job with a lookup stage that has input from a oracle connector and a reference also from oracle connector reading reords from different tables and comparing multiple keys. I made the constraint to Reject for lookup failure. I dragged the reject link to a transformer to process the records, but it gives a compilation error (Error : An unidentified error has occured) no other info.
If i connect both the output and the reject link, the flow compiles without error. But i dont need the matching records.
Is it normal that lookup does not support only the reject link ? May be in that case, is it better i write the sql query in the oracle conncetor instead of doing that using lookup.
LookUp Stage with just REJECT link
Moderators: chulett, rschirm, roy
Please see response below preceded by "=>".
Is it normal that lookup does not support only the reject link ?
=> Yes.
May be in that case, is it better i write the sql query in the oracle conncetor instead of doing that using lookup.
=> You can send the "matched" output records to a 'Sequential File' stage mapped to /dev/null.
Is it normal that lookup does not support only the reject link ?
=> Yes.
May be in that case, is it better i write the sql query in the oracle conncetor instead of doing that using lookup.
=> You can send the "matched" output records to a 'Sequential File' stage mapped to /dev/null.
if you pass everything through the lookup and back out, it will stamp rejected records with a null/0/empty string/etc type output for the failed lookups, and a simple constraint after can split out what you want.
you can also do a reject and success link path, and drop the success link path (put it to a peek or something) and keep the reject path flowing.
whether an SQL statement is better or possible depends on your data and setup but it may be best if you can filter it so that only lookup rejects are extracted, saving extracting, passing, and looking up records you never even wanted. It is usually best to only extract what you need, whenever possible, for most applications.
you can also do a reject and success link path, and drop the success link path (put it to a peek or something) and keep the reject path flowing.
whether an SQL statement is better or possible depends on your data and setup but it may be best if you can filter it so that only lookup rejects are extracted, saving extracting, passing, and looking up records you never even wanted. It is usually best to only extract what you need, whenever possible, for most applications.