Skip to main content

How can I include null values in the list of acceptable values (Validation Rule = In)?

Also, if an attribute is null, how does that impact the Type (Validation Rule = Type)?

Null is not a value. There is no operand. (no pointer etc.)

Null is not represented by a type.

Unless..

Type: Null is a quadruped, chimeric Pokémon with traits from a variety of creatures.

Or more seriously

an implementation-defined null pointer constant, cast to void.

etc.


I would add a NullAttributeMapper before the AttributeValidator and map the Null value to an actual value (e.g. "Unknown" for strings, -999 for numeric). Then you can add that value to the list of acceptable values in the AttributeValidator.


I would add a NullAttributeMapper before the AttributeValidator and map the Null value to an actual value (e.g. "Unknown" for strings, -999 for numeric). Then you can add that value to the list of acceptable values in the AttributeValidator.

@erik_jan Great idea... The other idea that I had was to use a tester, but for now I guess I'll give your idea a try 🙂
@erik_jan Great idea... The other idea that I had was to use a tester, but for now I guess I'll give your idea a try :)
I thought of the Tester, but that allows testing one attribute at a time. The NullAttributeMapper allows setting default values for multiple attributes in one transformer.

 

 


Due to the lack of a discreet "Is Null" evaluator, when looking to pass (as opposed to fail) Null values through the AttributeValidator, use the "Not Null" Rule/Evaluator and invert the output ports - connect Failed as a Pass and Passed as a Fail. 

 

The logic here is that you are looking for the opposite of "Not Null" which is the failed subset of "Not Null", it's the equivalent of "Is Null" with the output channels reversed/transposed.AttributeValidator PassNull


Reply