Lookup File stage Doubt...

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
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

Lookup File stage Doubt...

Post 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...
synsog
Premium Member
Premium Member
Posts: 232
Joined: Sun Aug 01, 2010 11:01 pm
Location: Pune

Re: Lookup File stage Doubt...

Post 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.
allavivek
Premium Member
Premium Member
Posts: 211
Joined: Sat May 01, 2010 5:07 pm

Re: Lookup File stage Doubt...

Post 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 ....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Re: Lookup File stage Doubt...

Post 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.
Phil Hibbs | Capgemini
Technical Consultant
Post Reply