Skip to main content
Solved

Apply DQ rule on a boolean type

  • June 16, 2023
  • 1 reply
  • 156 views

Forum|alt.badge.img

I am trying to apply a rule on a boolean type attribute to find if the value is “Ja” or "Nee”. However I couldn’t  achieve the expected outcome with advanced expression as its a bolean type. Also looked in to the documentation for one expression.

Any suggestions to get the similar results with boolean type attribute?

Best answer by matej

Not sure if I understand the question properly @Gerson, however:

  1. If you are trying to check if the values of the column contains only either “Ja” or “Nee”, then this Advanced Expression should work for you:
    (INPUT is in {"Ja", "Nee"})
  2. If the column doesn’t contain strings “Ja” or “Nee”, but rather values expressing logical TRUE and FALSE (column of a boolean type), then this should work for you:
    (INPUT is in {TRUE, FALSE})

You can see more in the documentation:

  1. Data Quality rules
  2. ONE Expressions (Advanced Expressions)

1 reply

Forum|alt.badge.img+1
  • Ataccamer
  • Answer
  • June 23, 2023

Not sure if I understand the question properly @Gerson, however:

  1. If you are trying to check if the values of the column contains only either “Ja” or “Nee”, then this Advanced Expression should work for you:
    (INPUT is in {"Ja", "Nee"})
  2. If the column doesn’t contain strings “Ja” or “Nee”, but rather values expressing logical TRUE and FALSE (column of a boolean type), then this should work for you:
    (INPUT is in {TRUE, FALSE})

You can see more in the documentation:

  1. Data Quality rules
  2. ONE Expressions (Advanced Expressions)