Skip to main content
Question

Reject all features if some don't validate

  • Apr 28, 2022 3:17 AM UTC
  • 3 replies
  • 66 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+23
  • Safer
  • Apr 28, 2022 7:27 AM UTC

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+22
  • Supporter
  • Apr 28, 2022 11:58 AM UTC

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
  • Apr 29, 2022 12:06 AM UTC

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