lookup failing gives wrong warning message
Moderators: chulett, rschirm, roy
lookup failing gives wrong warning message
Hi
I have a doubt.Plz help me out in solving this
My job is like this seq----->trans------->oci
In trans I am doing many lookups and I specified the link order for them also.Now my question is when my lookup fails due to any link then it gives the same warning message as the last lookup is failing as my last lookup is ok.
Can you help me what shall I have to do to get the warning message as exactly which lookup is failing.
thanks in advance
mohan
I have a doubt.Plz help me out in solving this
My job is like this seq----->trans------->oci
In trans I am doing many lookups and I specified the link order for them also.Now my question is when my lookup fails due to any link then it gives the same warning message as the last lookup is failing as my last lookup is ok.
Can you help me what shall I have to do to get the warning message as exactly which lookup is failing.
thanks in advance
mohan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Re: lookup failing gives wrong warning message
No, not really. Help us out here...
I really don't understand what you are saying here. Can you provide some examples of these 'warning messages' you are asking about?mohanraj wrote:Now my question is when my lookup fails due to any link then it gives the same warning message as the last lookup is failing as my last lookup is ok.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Hi chulett
My problem is I am validating four of my source fields against some values.For this I have taken four reference links from four different hash files in transformer.Suppose consider my fourth lookup is "d".When I run my job and my second lookup fails and fourth lookup is correct then also I get warning message as fourth lookup is failing.When I changed the third col lookup as the last link order then my job log is giving as third col lookup is failed irrespective of which lookup is failed.
This shows that irrespective of my lookup the warning message what I will get is the last Input link order lookup.
Thanks in advance
Mohan
My problem is I am validating four of my source fields against some values.For this I have taken four reference links from four different hash files in transformer.Suppose consider my fourth lookup is "d".When I run my job and my second lookup fails and fourth lookup is correct then also I get warning message as fourth lookup is failing.When I changed the third col lookup as the last link order then my job log is giving as third col lookup is failed irrespective of which lookup is failed.
This shows that irrespective of my lookup the warning message what I will get is the last Input link order lookup.
Thanks in advance
Mohan
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
If you want to identify which lookup failed you have two choices.
- A separate Transformer stage for each lookup.
Separate test conditions on each of the reference input links - either check the link variable NOTFOUND or whether the returned key value is NULL.
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.
A separate Transformer stage for each lookup would be overkill, IMHO, but would certainly ease the confusion as to which lookup failed.
But I really don't see the confusion. Each lookup can be checked individually for success or failure. As noted, each will have its own unique NOTFOUND link variable that can be explicitly checked or you can do it the old fashioned way and check to see if a key field is null.
In your example with four reference lookups, if the second fails while the fourth succeeds but you are getting some kind of 'warning' logged that the fourth failed, then the job's logic to determine which failed is faulty. It's all under your control, each lookup either succeeds or fails and DataStage doesn't care one way or the other and it certain doesn't log anything when one 'fails', your job must be coded to do that. Heck, sometimes a lookup 'failure' is exactly what you want to happen and 'success' is a bad thing! That's why sometimes they are referred to as a 'hit' or a 'miss' on the lookup.
Bottom line, check your job and how it is testing each lookup. Post the code or constraint or something more specific to explain what you are doing / seeing and we can give more specific advice on solving this for you.
But I really don't see the confusion. Each lookup can be checked individually for success or failure. As noted, each will have its own unique NOTFOUND link variable that can be explicitly checked or you can do it the old fashioned way and check to see if a key field is null.
In your example with four reference lookups, if the second fails while the fourth succeeds but you are getting some kind of 'warning' logged that the fourth failed, then the job's logic to determine which failed is faulty. It's all under your control, each lookup either succeeds or fails and DataStage doesn't care one way or the other and it certain doesn't log anything when one 'fails', your job must be coded to do that. Heck, sometimes a lookup 'failure' is exactly what you want to happen and 'success' is a bad thing! That's why sometimes they are referred to as a 'hit' or a 'miss' on the lookup.
Bottom line, check your job and how it is testing each lookup. Post the code or constraint or something more specific to explain what you are doing / seeing and we can give more specific advice on solving this for you.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers