deequ icon indicating copy to clipboard operation
deequ copied to clipboard

Improve usability of verification suite results if validation is a success

Open andreaslang opened this issue 3 years ago • 3 comments

I am not sure if I am missing something, but I have been struggling making historical verification suite results usable in the sense of that I know what the actual condition was. I have been using hints, which makes things better for failed checks (I actually see what I was checking for), but hints are not added if the assertion was OK.

This code in AnalysisBasedConstraint.scala is what I mean in particular.

          if (assertionOk) {
            ConstraintResult(this, ConstraintStatus.Success, metric = Some(metric))
          } else {
            var errorMessage = s"Value: $assertOn does not meet the constraint requirement!"
            hint.foreach(hint => errorMessage += s" $hint")

            ConstraintResult(this, ConstraintStatus.Failure, Some(errorMessage), Some(metric))
          }

I feel like I am missing a trick here, maybe also caused by the fact that I am using things indirectly via pydeequ, but isn't there a way to get to some output, which tells me: You checked for this (via hint), the metric was this (via assertOn) and all was fine.

Essentially this would be perfect:

          if (assertionOk) {
            val successMessage = s"Value: $assertOn does meet the constraint requirement!"
            hint.foreach(hint => successMessage += s" $hint")

            ConstraintResult(this, ConstraintStatus.Success, Some(successMessage), Some(metric))
          } else {
            var errorMessage = s"Value: $assertOn does not meet the constraint requirement!"
            hint.foreach(hint => errorMessage += s" $hint")

            ConstraintResult(this, ConstraintStatus.Failure, Some(errorMessage), Some(metric))
          }

andreaslang avatar Jun 17 '21 14:06 andreaslang

We like this idea, can you submit a PR?

twollnik avatar Jul 20 '21 15:07 twollnik

Sure can do, will put something up in the next few days.

andreaslang avatar Jul 20 '21 15:07 andreaslang

Thanks. Don't worry about doing this quickly, we likely won't get around to reviewing the PR until mid august or end of august anyway.

twollnik avatar Jul 20 '21 16:07 twollnik