Page 1 of 1

Lookup Stage

Posted: Tue Aug 14, 2007 10:32 am
by irajasekharhexa
Hi,

I have a requirement that needs to retrive the data from the source where the lookup is not matched.

Suppose if source have the 10 records and look up has the 3 matched records remaining 7 unmatched records should be taken forward to Output link.

What i am doing is i taken normal lookup and a reject link.

So watever the reject link is getting data is taking into the output link. Is any other way can we achieve this.

Some thing like if lookup not happened take the rows to next stage?


Regds

Re: Lookup Stage

Posted: Tue Aug 14, 2007 1:22 pm
by meena
Join / Merge stage.

I have a requirement that needs to retrive the data from the source where the lookup is not matched.

Suppose if source have the 10 records and look up has the 3 matched records remaining 7 unmatched records should be taken forward to Output link.

What i am doing is i taken normal lookup and a reject link.

So watever the reject link is getting data is taking into the output link. Is any other way can we achieve this.

Some thing like if lookup not happened take the rows to next stage?


Regds

Posted: Tue Aug 14, 2007 3:17 pm
by Havoc
Lookup Stage : Take key column from primary link and also take column from the reference link. The column derived from reference link will be a NULL (if nullability of that column is set to 'Yes' else the appropriate null default value will be set to that column (e.g. 0 for an Integer). Place a transformer in the output link following the Lookup stage and do appropriate null handling/etc and you can identify which record failed the lookup and you can propagate it further. Remember.. to keep the lookup in 'Continue' mode if you wish to achieve this.

Join Stage: You can use left outer join on the link which was the primary link (in case of Lookup stage) and do the rest as mentioned above.

Merge Stage: The output from Merge Stage in Keep mode can be erratic if you have duplicates coming in for your master link which you will need to interchange if you wish to achieve this..

Hope this helps ..

Re: Lookup Stage

Posted: Tue Aug 14, 2007 5:19 pm
by vijayrc
irajasekharhexa wrote:Hi,

I have a requirement that needs to retrive the data from the source where the lookup is not matched.

Suppose if source have the 10 records and look up has the 3 matched records remaining 7 unmatched records should be taken forward to Output link.

What i am doing is i taken normal lookup and a reject link.

So watever the reject link is getting data is taking into the output link. Is any other way can we achieve this.

Some thing like if lookup not happened take the rows to next stage?


Regds
In Lookup, you can either Fail/Reject/Continue if a specific condition is not met or if a matching row in reference file is not found. So I guess your option should say Continue if no match found.

Posted: Tue Aug 14, 2007 6:52 pm
by ray.wurlod
The Merge stage consumes rows from its Update input(s) as they are touched. Therefore any remaining rows once the Master input has been exhausted will be those that were not touched.

Posted: Wed Aug 15, 2007 1:57 pm
by abhi989
In your lookup stage properties - set condition not met = Fail and Lookup Failure = Reject. Take the reject link and process that.

Hope it helps

Posted: Thu Aug 16, 2007 10:38 am
by irajasekharhexa
abhi989 wrote:In your lookup stage properties - set condition not met = Fail and Lookup Failure = Reject. Take the reject link and process that.

Hope it helps
I was done the Job which i used the logic was same as Abhi said. It's working fine.


Thanks all.

Regds