Skip to main content
Question

Null In Attribute Validator List


runneals
Contributor
Forum|alt.badge.img+22

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)?

5 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • January 19, 2018

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.


erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • January 19, 2018

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.


runneals
Contributor
Forum|alt.badge.img+22
  • Author
  • Contributor
  • January 19, 2018
erik_jan wrote:

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
Contributor
Forum|alt.badge.img+18
  • Contributor
  • January 19, 2018
runneals wrote:
@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.

 

 


thetoddg
Contributor
Forum|alt.badge.img
  • Contributor
  • August 4, 2020

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings