Page 1 of 1

Lookup File stage Doubt...

Posted: Sun Aug 08, 2010 11:37 am
by allavivek
Hi All,

I am using lookup file stage for reference to lookup stage..

In my source and lookup file stage columns are..

source:
id-key
name

lookup file stage
id-key
name1

When i tried to make a reference link between id's in lookup stage i received popup as..

"key expression cannot be set to individual column for lookup file set reference..."

But iam getting desired ouput..
id
name
name1

Is the key expresions automatically set or should we...

Previously i had option to select range/caseless/equality on reference link...but iam not having these when using lookup fileset as reference...

Can any one explain this behaviour.....
Thank you...

Re: Lookup File stage Doubt...

Posted: Sun Aug 08, 2010 7:40 pm
by synsog
hi,

Did you go through the manual of Datastage for Looup file stage.
while doing a Lookup with lookup File stage it is very Important to define the Key Columns and if you won;t specify the key columns in other than filestage it will not give you output.

Re: Lookup File stage Doubt...

Posted: Sun Aug 08, 2010 8:00 pm
by allavivek
Hi Thanks for reply..

I defined key columns correctly...

My question is...in 8.x While using any stage other than look up file set iam getting option for caseless/range/equal in reference link in lookup stage ...But while using lookup file stage as reference it was automatically mapping keys and producing output...

Is this behviour of lookup stage with lookup fileset correct??

Thanks ....

Posted: Sun Aug 08, 2010 8:21 pm
by chulett
Yes. You set all that when the Lookup Fileset is created, not when it is used. See the Parallel Job Developer Guide for details.

Re: Lookup File stage Doubt...

Posted: Mon Aug 09, 2010 2:50 am
by PhilHibbs
allavivek wrote:My question is...in 8.x While using any stage other than look up file set iam getting option for caseless/range/equal in reference link in lookup stage ...But while using lookup file stage as reference it was automatically mapping keys and producing output...

Is this behviour of lookup stage with lookup fileset correct??
Yes. A Lookup Stage that is connected to a Lookup File Set behaves a little differently to a Lookup Stage that is connected to a stage that normally streams its output. The key is defined when you create the Lookup File Set, and the Lookup Stage cannot do anything creative with the key such as decide to do the look-up in a non-case-sensitive way. And, the field(s) on the input link must match the key field(s) in the Lookup File Set in all important respects such as name, type, length, etc.

I have decided (partly based on ArndW's comment) not to use Lookup File Sets at all. I had problems with partitioning, and it appears that the stream coming into the Lookup Stage has to be partitioned in the same way as the Lookup File Set, and you need to mess with the column metadata in your data stream as well. If you have a lot of streamed data and a small set of lookup data, then the tail is wagging the dog.