Skip to content

Satisfies Expression Check FAQ

Answers to common questions about what the expression must return, how empty values behave, and how anomalies are reported, grouped by topic.

Behavior

What must the expression return?

True or false for each row. A bare column or a computed value is not a valid expression; a comparison, a boolean function, or a CASE whose branches all return true or false is.

What happens when the expression returns nothing?

The row is reported. A row passes only when the expression is definitely true, so an empty column in a comparison, or a CASE with no matching branch, causes a failure.

How do I let rows with empty values pass?

State it in the expression: col IS NULL OR <condition>. To keep reporting them, col IS NOT NULL AND <condition> makes the intent explicit.

Which fields does the check read?

Whichever ones the expression names. The rule works them out from the expression and stores the list on the check, so the API returns it under fields even though you never send it.

When the derived list is wrong, for example because the expression builds a column name dynamically or a word in it happens to match a field name, select the fields yourself in the form's Fields input, or send fields through the API. Your list replaces the derived one. Clear the selection, or use the re-derive button next to it, to go back to the fields the expression names. The field list does not change what the check evaluates; it only decides which fields the check and its anomalies are associated with.

Can the expression reference a subquery?

Yes, including one over the data being scanned via the built-in {{_qualytics_self}} variable. Be aware that a subquery runs per row, so it is far more expensive than a plain comparison.


Anomaly Reporting

What do the anomaly messages look like?

Record Anomaly: This record does not satisfy the expression: <expression>

Shape Anomaly: N of M asserted records do not satisfy the expression: <expression>

When a filter is set, the message names it at the end of its first sentence, as (applied to records where <expression>). Record and Shape Anomaly messages both carry it.

Does Satisfies Expression produce Record Anomalies, Shape Anomalies, or both?

At 100% coverage (the default), violating rows are reported as Record Anomalies. Below 100% coverage, a failed coverage assertion produces one Shape Anomaly for the dataset.

Scan settings can group a large number of Record Anomalies into one rolled-up Shape Anomaly, which carries the Shape Anomaly message. This behavior applies across rule types and is documented under Maximum Record Anomalies per Check.

Does Custom Anomaly Description work for Satisfies Expression?

Yes. Satisfies Expression emits Record Anomalies, so the anomaly_message_field payload field (and the Custom Anomaly Description toggle in the UI) applies.

When the option points at another column on the same row, the Record Anomaly message becomes that column's value for the violating row, shown as written. When the column is null, missing, or empty, the message falls back to the rule's standard wording, and when the column is masked the message reads <masked>. Shape Anomaly messages are unaffected.

Which cells are highlighted in Source Records?

Every field on the check. Its field list is derived from the expression unless you selected the fields yourself, so the highlight covers that whole list rather than a single offending value. Read the expression quoted in the message against those values to see which part did not hold.


Configuration

Can I lower the coverage on a Satisfies Expression check?

Yes. Coverage at 1.0 (100%) means every row must pass. Lowering coverage to 0.995 allows up to 0.5% of rows to fail without raising an anomaly; once the failing fraction goes past that, the check reports a Shape Anomaly. Use lower coverage with care: a real regression that happens to fall just under the threshold will not raise an alert at all.

Can I change the expression later?

Yes. In the UI, open the check, edit Expression, and click Update; see Edit a Check for the full steps. Through the API, a PUT to /api/quality-checks/{id} updates the properties object. The rule type, the target container, and the associated Check Template stay immutable.

What permission do I need to create or edit a Satisfies Expression check?

The Drafter team permission on the datastore covers Draft work (creating a check as Draft or editing it while it stays Draft). Anything that puts the check into evaluation, such as creating or editing an Active check, archiving, or deleting, requires the Author team permission (or above). Viewing only requires Reporter. See Permissions for the full matrix.

Should I use Satisfies Expression or a dedicated rule?

Always prefer a dedicated rule when one fits: it states its intent, needs no SQL review, and names the field in its message. Use this rule for logic that spans several fields, branches on a condition, or has no other home.