Problem with Lookup

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
debasisp
Premium Member
Premium Member
Posts: 34
Joined: Wed Feb 01, 2006 1:53 am

Problem with Lookup

Post by debasisp »

Hi,
I have a input dataset with one field "Id" as key. I am doing a lookup using a lookup stage with a DB2 table based upon "Id". But I am getting the following error ...

lookupstage: Error when checking operator: Key field "Id" not found in input schema

But if I perform lookup with anyother field in the dataset I am not getting any error.

Please help me out .

Cheers
Debasis
Nripendra Chand
Premium Member
Premium Member
Posts: 196
Joined: Tue Nov 23, 2004 11:50 pm
Location: Sydney (Australia)

Post by Nripendra Chand »

check the input dataset schema by viewing it through dataset management to check whether "Id" field really exist.
-Nripendra Chand
debasisp
Premium Member
Premium Member
Posts: 34
Joined: Wed Feb 01, 2006 1:53 am

Post by debasisp »

Hi Nri,
I have checked that .. Id is present in the dataset schema..
I also deleted and recreated the dataset but no luck.

Cheers
Debasis
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

If it is present in the dataset schema then you are left with the link coming from DB2. That is supported by the error message noting the "key" field is missing.
debasisp
Premium Member
Premium Member
Posts: 34
Joined: Wed Feb 01, 2006 1:53 am

Post by debasisp »

ArndW wrote:If it is present in the dataset schema then you are left with the link coming from DB2. That is supported by the error message noting the "key" field is missing. ...
Hi,
Can you please tell me how to get rid of this error. I checked the dataset schema and also removed and recreated the lookup link. But no luck..

Cheers
Debasis
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Are you doing a sparse lookup or a normal one?
debasisp
Premium Member
Premium Member
Posts: 34
Joined: Wed Feb 01, 2006 1:53 am

Post by debasisp »

Normal lookup
DSDexter
Participant
Posts: 94
Joined: Wed Jul 11, 2007 9:36 pm
Location: Pune,India

Post by DSDexter »

Debasis,

Are the column names of the field you are defining as key same in both input link and reference link?

If so, Try renaming the either of the key field and then perform a lookup. e.g you could mention the reference column name as Id1 by writing a userdefined sql.

Try this and let us know whether it worked.
Thanks
DSDexter
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

With a normal lookup the lookup stage will have a link from a column in the top left to a column marked as "key" in the bottom left. Are both those columns called "Id" in your job? What happens if you change the column name of at least one of them as suggested above?
debasisp
Premium Member
Premium Member
Posts: 34
Joined: Wed Feb 01, 2006 1:53 am

Post by debasisp »

DSDexter wrote:Debasis,

Are the column names of the field you are defining as key same in both input link and reference link?

If so, Try renaming the either of the key field and then perform a lookup. e.g you could mention the reference column name as Id1 by writing a userdefined sql.

Try this and let us know whether it worked.
Hi,
the column names are different .. But when i changed the lookup to sparse it is working fine.. Although this is a workaround and can be done in this way but still the question is open that why it is not working in normal lookup.

Thanks to all who joined this discussion . If any one of us find this solution please post it.

Cheers
Debasis
rajasingam
Participant
Posts: 8
Joined: Thu Feb 21, 2008 4:22 am

Lookup

Post by rajasingam »

How to change normal Lookup to Sparse Lookup?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This is not the original problem. Please start a new thread.

We frown upon hijacking others' threads.
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