look up error

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
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

look up error

Post by rahul8055 »

reference link tech_data of look up stage unique_data must have key fields defined

can anyone help me with this...I looked into the forms but couldn't find any


thanks
Rahul
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: look up error

Post by gateleys »

If you do not specify the key field, how do you expect the matching to take place?
gateleys
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Re: look up error

Post by rahul8055 »

gateleys wrote:If you do not specify the key field, how do you expect the matching to take place?
Do I need to specify it as primary key?
can you please expand your answer


thanks,
Rahul
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Re: look up error

Post by rahul8055 »

rahul8055 wrote:
gateleys wrote:If you do not specify the key field, how do you expect the matching to take place?
Do I need to specify it as primary key?
can you please expand your answer


thanks,
Rahul

There is one column from the master and 6 columns from the reference
and one column in common .

I used these columns for mapping.

thanks
rahul
gateleys
Premium Member
Premium Member
Posts: 992
Joined: Mon Aug 08, 2005 5:08 pm
Location: USA

Re: look up error

Post by gateleys »

rahul8055 wrote:
gateleys wrote:If you do not specify the key field, how do you expect the matching to take place?
Do I need to specify it as primary key?
can you please expand your answer


thanks,
Rahul
yes.
gateleys
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Re: look up error

Post by rahul8055 »

rahul8055 wrote:
rahul8055 wrote:
gateleys wrote:If you do not specify the key field, how do you expect the matching to take place?
Do I need to specify it as primary key?
can you please expand your answer


thanks,
Rahul

There is one column from the master and 6 columns from the reference
and one column in common .

I used these columns for mapping.

thanks
rahul

Hi gateleys,
It was not allowing me in the reference link I mean in the 6 columns to assign one of them as primary key but now I used a key expression which helped me to use that particular key as a primary key
Is that the problem?

Thanks,
Rahul
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It's got nothing to do with Primary Keys or any kind of indexing, but rather fields marked as Key Fields. They are the ones that will be bound into the 'where' clause of your lookup sql.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

chulett wrote:It's got nothing to do with Primary Keys or any kind of indexing, but rather fields marked as Key Fields. They are the ones that will be bound into the 'where' clause of your lookup sql. ...


Hi chulett
The mainstream is a table from database which has 6 columns
and the reference stream is a file with 1 column. They both have a common column and that one is marked as a key in the mainstream input.
The query used is select 1,2,3,4,5,6 from tablename.

In the output of the lookup mapping I match the 1 column from file and rest 5 from the table. and I got this error....this is the complete scenario...
and the error is

reference link tech_data of look up stage lookup _unique_data must have key fields defined

reference link is the file

Thanks,
Rahul
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

If you go the sequential file stage column properties, have you marked the key field with a tick in the box ?
rahul8055
Participant
Posts: 95
Joined: Wed Jun 23, 2010 7:41 pm

Post by rahul8055 »

Sainath.Srinivasan wrote:If you go the sequential file stage column properties, have you marked the key field with a tick in the box ?

yes I marked the key field but when I mark it I get a new error

Error Preprocessing primary key derivation for stage look_up

More from the error:-column:-unique_row_id
The supplied expression was empty


Thanks,
Rahul
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

That is because your lookup stage does not have the 'field link' between main and reference links.

I recommend you to undergo DataStage training. Earlier the better.
Post Reply