Default non-nullable value for a Lookup Stage
Posted: Thu May 28, 2009 1:29 am
Hi,
I am performing a lookup using a lookup stage and potentially, the values being looked up may not exist, which is fine.
I have set the stage to CONTINUE if the Lookup fails but the default value for the BIGINT field, which would have been derived from the lookup dataset, is being set to 0 (the lookup field is non-nullable) in the output.
Is there any way I can over-ride this default value in the stage itself - the manual does not offer any guidance and I cannot see any posts related to this topic. I want to set the value to -1 if the lookup fails.
If not, can a Modify stage after the lookup alter a value from 0 to -1 - again, the manual implies not. I could use a Transformer but wanted to implement a more efficient solution.
Or perhaps, is there an environment variable I can set to set a default non-nullable BIGINT to -1?
Many Thanks,
Daren
I am performing a lookup using a lookup stage and potentially, the values being looked up may not exist, which is fine.
I have set the stage to CONTINUE if the Lookup fails but the default value for the BIGINT field, which would have been derived from the lookup dataset, is being set to 0 (the lookup field is non-nullable) in the output.
Is there any way I can over-ride this default value in the stage itself - the manual does not offer any guidance and I cannot see any posts related to this topic. I want to set the value to -1 if the lookup fails.
If not, can a Modify stage after the lookup alter a value from 0 to -1 - again, the manual implies not. I could use a Transformer but wanted to implement a more efficient solution.
Or perhaps, is there an environment variable I can set to set a default non-nullable BIGINT to -1?
Many Thanks,
Daren