Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compliance calculation result #523

Open
vaishnavibv13 opened this issue Dec 5, 2023 · 1 comment
Open

Compliance calculation result #523

vaishnavibv13 opened this issue Dec 5, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@vaishnavibv13
Copy link

Describe the bug
case class AnalysisBasedConstraint should have var errorMessage = s"Value: $assertOn met the constraint requirement!" because $assertOn value specifies the number of rows which met the requirement.

To Reproduce
Steps to reproduce the behavior:

  1. Go to package com.amazon.deequ.constraints
  2. Click on AnalysisBasedConstraint
  3. Scroll down to pickValueAndAssert
  4. See error on else part var errorMessage = s"Value: $assertOn does not met the constraint requirement!"

Expected behavior
var errorMessage = s"Value: $assertOn met the constraint requirement!"

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
This value specifies the number of rows that met the requirements !

@vaishnavibv13 vaishnavibv13 added the bug Something isn't working label Dec 5, 2023
@Sat30
Copy link

Sat30 commented Mar 12, 2024

There is no bug here.
Actually we are passing some threshold value there in assertion
Assertion is like

 val assertion: Double => Boolean = {
      _  >= 0.6
  }
we pass this assertion in constraint

and finally it goes like this

assertOn  = (number of row passed the constraint) / (total number of rows)
if(assertion(assertOn)) print Success
else  print Value: $assertOn does not met the constraint requirement!"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants