Page 1 of 1

Missing Column in Hash File

Posted: Tue May 03, 2005 6:05 am
by vinaymanchinila
ColA ColB ColC
==== ==== ====
Ter 1 SPU
Ter 2 SPU
Ter 1 OCI
AUS 1 ORA


I have 3 columns in my hash file, only ColB and Column C make a key if combined. The issue is I have ColB in my source file but not Col C .

Is there a workaround for this look up.
Thanks

Missing Column in Hash File

Posted: Tue May 03, 2005 6:23 am
by Sunshine2323
Hi,

If u have keys defined in your Hash File then a look up has to be done against all the keys.

As can be seen from your data that values in any column are not unique and hence you have two columns forming the key.

If you create a new Hash File with only column B as the key, then the duplicates will be overwritten and that won't make any sense.

Depending on your requirement check whether you insert a COL C and hard code it to some value that can be looked up and is repeting for all the values of COL B

Posted: Tue May 03, 2005 6:26 am
by ArndW
Vinay,

a lookup stage to a hash file must use the whole key, so if it is a combined key you must know all parts of it for a lookup to function.

Posted: Tue May 03, 2005 6:36 am
by vinaymanchinila
Yes, I agre we need to look up all the keys, but I am in this situation. By the way can you throw some light on multi row look up and how it is done.
Thanks

Posted: Tue May 03, 2005 8:34 am
by ds_developer
Multirow lookup is available from 2 stages: ODBC and the Universe stage. It is enabled from the properties of the transformer (not in the stage). One row from the primary stage will result in 0, 1 or multiple rows being available for output depending on the match on the key and the number of rows in the lookup data.

It sounds like it might work for your situation if you use the Universe stage to access your hash file. I have used multirow lookup with the ODBC stage, but not with the Universe stage. Give it a try and let us know.

John

Posted: Tue May 03, 2005 9:35 am
by ArndW
ds_developer - is multirow available at Rev. 6.x?

Posted: Tue May 03, 2005 10:23 am
by ds_developer
Arnd,

I don't have 6.x available (I'm on 7.01), so I can't say for sure. The eService KnowledgeBase says it was available in 6.0r3 for both ODBC and Universe.

John

Posted: Tue May 03, 2005 10:54 am
by vinaymanchinila
Hi John,
We are upgrading to 7.5 this Friday, so if you can let me know which .pdf file I can refer to for the mutli row look up , it would be awesome.
Thanks,

Posted: Tue May 03, 2005 11:03 am
by ds_developer
You will find it in 'servjdev.pdf'; search for 'multirow'.
John

Posted: Tue May 03, 2005 11:35 am
by vinaymanchinila
I guess it is not available in 6.0.1, will try it in 7.5. In 6.0.1 I dont even get "Link Properties" when I right click on the link!.
Thanks for the info .

Posted: Tue May 03, 2005 12:49 pm
by chulett
Are you doing it from inside the Transformer? That's where you need to be right-clicking.

Posted: Tue May 03, 2005 12:54 pm
by vinaymanchinila
I have a ODBC stage look up and I go inside the Trasformer Stage and right click on the look up link. I donot have the option for Link Properties! Is it not the way in 6.0.1 !

Posted: Wed May 04, 2005 5:59 am
by ray.wurlod
Yes you do. It's a check box, usually in the lower left-hand corner. But you need first to open the link properties window.

Posted: Wed May 04, 2005 6:46 am
by vinaymanchinila
Hi Ray,
I am using version 6.0.1 and in my job I have one source flat file, one ODBC look up, transformer and a target flat file. When I open the transformer stage, I have 3 link boxes. On the hash link when I right click or double click I donot find the "LinkProperty" option itslef!.
Can you help me out if its a version of DS issue or am I doing something out of way.
Thanks,

Posted: Wed May 04, 2005 6:55 am
by chulett
Sure! Try this! :wink:

In the Transformer, don't right-click on the links themselves (i.e. the lines that join the boxes), click instead on the 'box' that represents the Hash stage lookup. Then you'll get Link Properties as one of the options.

Also as noted, you must use a UV or ODBC stage to get the extra special option to enable Multirow Lookups.