Default value for Continue option in Lookup
Moderators: chulett, rschirm, roy
Default value for Continue option in Lookup
Hi,
Im doing a lookup with a sequential file as source and a reference dataset.
The requirement is that if there are 100 rows in source there should be 100 in output after the lookup. Hence I used the Continue option in case of lokkup failure.But another need is that all numeric fields should be populated with value -99 if lookup failed and these fields were not populated. Currently the value is 0,hence I'm unable to midentify if the 0 is due to lookup failure or it was already a value in the field.
Regards
Wah
Im doing a lookup with a sequential file as source and a reference dataset.
The requirement is that if there are 100 rows in source there should be 100 in output after the lookup. Hence I used the Continue option in case of lokkup failure.But another need is that all numeric fields should be populated with value -99 if lookup failed and these fields were not populated. Currently the value is 0,hence I'm unable to midentify if the 0 is due to lookup failure or it was already a value in the field.
Regards
Wah
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can not do this in the Lookup stage itself (one stage, one task) but can do so in any downstream Modify or Transformer stage. Pass the columns from the reference link to the output and replace null with -99 as required.
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
That's fine, use one of the VarChar fields to test whether the lookup was successful or not. Ideally use a field that is not null in the reference source, so that you can be confident that, if it is null on the output, this is because the lookup failed.
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.
My job looks like this:
The problem is any rows not matching with RefCharLkp, the value of null is populated for the column, but for rows not matching RefNumLkp 0 is populated. Hence Im unable to make out the difference.
Regards
Wah
Code: Select all
RefCharLkp
|
|
|
|
SourceSeqFile----------Lookup---------OuSeqFile
|
|
|
|
|
RefNumLkp
Regards
Wah
-
- Premium Member
- Posts: 291
- Joined: Wed Sep 26, 2007 11:23 am
- Location: Madrid, Spain
I am really surprised how some tasks that were so easy in Server, becomes so difficult and results in tons of stages in your canvas in Parallel
This, in server could have been accomplished with a simple Transformer receving as many hash files as need
I guess this is forced to get benefits of partition processing, but gets designing much harder....
This, in server could have been accomplished with a simple Transformer receving as many hash files as need
I guess this is forced to get benefits of partition processing, but gets designing much harder....