Hash Lookup Multiple values
Moderators: chulett, rschirm, roy
Hash Lookup Multiple values
Hi !
?I need some help
How I can to arrange lookup for some values .
For example ,
I need to check if any rows with id =1 and type = 5 or 6 within hash file with keys id and type
?I need some help
How I can to arrange lookup for some values .
For example ,
I need to check if any rows with id =1 and type = 5 or 6 within hash file with keys id and type
-
- Premium Member
- Posts: 1255
- Joined: Wed Feb 02, 2005 11:54 am
- Location: United States of America
Re: Hash Lookup Multiple values
snassimr wrote:Hi !
?I need some help
How I can to arrange lookup for some values .
For example ,
I need to check if any rows with id =1 and type = 5 or 6 within hash file with keys id and type
Specify your keys for the LookUp.
In the Transformer you need to check
"Returns Multiple Row Set" option for the lookup (link).
When Multiple rows are returned for a particular record, code your condition(if type = 5 or 6), you will be able to write out the record you are interested in.
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm
Hi Chullet,
Hey i didnot find the option in the transformer that is linked with the
hash file , can you please tell me where it is exactly found,
what did you mean by when you said that hash files do 'not' natively
support 'Multiple row result sets' ?
can we use the above feature or not advisable.
Thanks a bunch,
Hey i didnot find the option in the transformer that is linked with the
hash file , can you please tell me where it is exactly found,
Hashed files do not natively support 'Multiple row result sets'.
kollurianu - it's a Link property. Get to it by right-clicking on the lookup stage from inside the Transformer.
what did you mean by when you said that hash files do 'not' natively
support 'Multiple row result sets' ?
can we use the above feature or not advisable.
Thanks a bunch,
You won't as it is not a valid option for a hashed file - you'll only find that option there when the link is to a UV stage or an ODBC stage.
I'm not going into the gory details as they been posted here ad nauseum, but you can point a UV stage to an existing Hashed file and then you can get the hashed file to return multiple rows per lookup. But you need to do several things to set that up properly or it either won't work or it will work very very slowly.
I'm not going into the gory details as they been posted here ad nauseum, but you can point a UV stage to an existing Hashed file and then you can get the hashed file to return multiple rows per lookup. But you need to do several things to set that up properly or it either won't work or it will work very very slowly.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Two choices.
1. Lookup on the key and test the returned non-key value within stage variables.
2. Create your hashed file with more than one key column, and perform multiple lookups.
Option 1 is the more efficient.
1. Lookup on the key and test the returned non-key value within stage variables.
2. Create your hashed file with more than one key column, and perform multiple lookups.
Option 1 is the more efficient.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 614
- Joined: Fri Feb 06, 2004 3:59 pm