Hi,
Is there anyway to set the null value for an integer column which is an unmatched row from the update link of a Merge stage(in Keep Mode)? As of now , all integer columns of unmatched rows are set to 0. Is there a way to set this to some other value?
Thanks in advance
Null Value for Integer
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 247
- Joined: Thu Apr 27, 2006 6:38 am
- Location: Hyderabad
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Code: Select all
NonNullField : int32 = handle_null(InputField, 42)
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.
Hmmm ...I would greatly appreciate it if you could elaborate a lil bit more on this Ray.. (not on the The Hitchhiker's Guide to the Galaxy bit )ray.wurlod wrote:Forty two is the ultimate answer to life, the universe and everything. ...Code: Select all
NonNullField : int32 = handle_null(InputField, 42)
Can i incorporate this in a transformer instead? Basically the job design has a transformer following the merge stage. Is there a way I can go about setting the transformer constraint or if-else rule to check for a value like -3 instead of 0, cause there is a possibility that 0 might actually be a valid value.
Thanks...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In a Transformer stage the equivalent function is NullToValue(). When the lookup fails and the rule is Continue, you get a genuine NULL on the output. If the field is non-nullable you also get a warning, and that field will take its default value, which you can set (for example to -3) in the metadata. Otherwise, make the field nullable and handle the NULL in the downstream Transformer stage.
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.