Skip to main content
Question

Reject all features if some don't validate

  • April 28, 2022
  • 3 replies
  • 25 views

peteratqfes
Contributor
Forum|alt.badge.img+6

I receive datasets from users where some rows may have empty values for compulsory attributes.

The AttributeValidator is testing for empty attributes.

 

If I find any empty rows I want to reject all features.

 

Any ideas? Somehow using a FeatureHolder?

image

3 replies

DanAtSafe
Safer
Forum|alt.badge.img+19
  • Safer
  • 345 replies
  • April 28, 2022

Hi @Peter Timmers​ This reminds me of the question, "How many good eyes does the average person have?"

If you give each output of the AttributeValidator a score, then get the average score with a StatisticsCalculator, then all will fail the Tester if the average isn't equal to the higher score.

image


ctredinnick
Supporter
Forum|alt.badge.img+19
  • Supporter
  • 225 replies
  • April 28, 2022

You can also do it this way, using a feature merger to 'wait' for errors. Sample 1 feature, Keep no attributes, and merge on 1 to 1.

 

image


peteratqfes
Contributor
Forum|alt.badge.img+6
  • Author
  • Contributor
  • 17 replies
  • April 29, 2022

@danatsafe​ @ctredinnick​ Thank you both. That definitely answers my question.