Skip to main content
Question

Null In Attribute Validator List

  • January 19, 2018
  • 5 replies
  • 174 views

runneals
Supporter
Forum|alt.badge.img+27

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

5 replies

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • 2252 replies
  • 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+22
  • Contributor
  • 2179 replies
  • 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
Supporter
Forum|alt.badge.img+27
  • Author
  • Supporter
  • 321 replies
  • 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.

@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+22
  • Contributor
  • 2179 replies
  • January 19, 2018
@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
  • 3 replies
  • 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