Greater Than Check Examples
Three real-world scenarios that show how the Greater Than check is typically used in production: enforcing a strict minimum on order totals, requiring a minimum tenure with an inclusive threshold and a filter, and tolerating rounding noise on a reconciled amount. The first two run at 100% coverage and report Record Anomalies; the third lowers coverage and reports a Shape Anomaly instead.
The situation: Every order must carry a total strictly above zero. Rows with 0 come from a checkout bug that saves the order before pricing runs, and the threshold itself must not pass, so Inclusive is off.
Check configuration
| Field | Value |
|---|---|
| Rule | Greater Than |
| Field | o_totalprice |
| Filter | (none) |
| Custom Anomaly Description | Off |
| Value | 0 |
| Inclusive | Off |
| Numeric | (none) |
| Coverage | 100% |
| Owner | (check creator) |
| Anomaly Assignee | (Checkout Engineering) |
| Description | Order total must be greater than zero. |
| Tags | orders, range |
| Additional Metadata | jira: DATA-8401 |
| Status | Active |
Payload
{
"description": "Order total must be greater than zero.",
"rule": "greaterThan",
"fields": ["o_totalprice"],
"container_id": 145,
"coverage": 1,
"filter": null,
"properties": {"value": 0, "inclusive": false},
"tags": ["orders", "range"],
"additional_metadata": {"jira": "DATA-8401"},
"anomaly_message_field": null,
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 12
}
Sample Data
| o_orderkey | o_totalprice | o_orderstatus |
|---|---|---|
| 1 | 1840.50 | F |
| 2 | 0 | O |
| 3 | 220.00 | F |
| 4 | (null) | O |
What gets flagged
Order 2 holds exactly 0. With Inclusive off the comparison is > 0, so the row fails. Order 4 is NULL and passes without firing an anomaly. Coverage is 100%, so the failing row is reported as a Record Anomaly.
Record Anomaly
The field 'o_totalprice' has value 0, which is not greater than 0
Flowchart
graph TD
A["No filter, evaluate all rows"] --> B["Read o_totalprice"]
B --> C{"Is value NULL?"}
C -->|Yes| D["Row passes"]
C -->|No| E{"Is o_totalprice > 0?"}
E -->|Yes| D
E -->|No| F["Flag row.<br/>Record Anomaly per failing row."]
Equivalent SQL
The situation: Employees on the permanent contract qualify for an annual bonus once they reach 12 months of tenure. Exactly 12 months qualifies, so Inclusive is on. Temporary contracts are out of scope.
Check configuration
| Field | Value |
|---|---|
| Rule | Greater Than |
| Field | tenure_months |
| Filter | contract = 'permanent' |
| Custom Anomaly Description | Off |
| Value | 12 |
| Inclusive | On |
| Numeric | (none) |
| Coverage | 100% |
| Owner | (check creator) |
| Anomaly Assignee | (People Analytics) |
| Description | Permanent employees in the bonus pool must have at least 12 months of tenure. |
| Tags | hr, eligibility |
| Additional Metadata | jira: DATA-8444 |
| Status | Active |
Payload
{
"description": "Permanent employees in the bonus pool must have at least 12 months of tenure.",
"rule": "greaterThan",
"fields": ["tenure_months"],
"container_id": 512,
"coverage": 1,
"filter": "contract = 'permanent'",
"properties": {"value": 12, "inclusive": true},
"tags": ["hr", "eligibility"],
"additional_metadata": {"jira": "DATA-8444"},
"anomaly_message_field": null,
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 33
}
Sample Data (filtered to contract = 'permanent')
| employee_id | contract | tenure_months |
|---|---|---|
| E-01 | permanent | 36 |
| E-02 | permanent | 7 |
| E-03 | permanent | 12 |
Why the filter matters
The filter runs before the comparison, so temporary contracts are never tested against the tenure rule. Only permanent employees are evaluated.
What gets flagged
E-02 has 7 months and does not qualify. E-03 has exactly 12 and passes, because Inclusive is on. Coverage is 100%, so the failure is reported as a Record Anomaly, and the message ends with the filter that scoped the evaluation.
Record Anomaly
The field 'tenure_months' has value 7, which is not greater than 12 [filter: contract = 'permanent']
Flowchart
graph TD
A["Apply filter: contract = 'permanent'"] --> B["Read tenure_months"]
B --> C{"Is tenure_months >= 12?"}
C -->|Yes| D["Row passes"]
C -->|No| E["Flag row.<br/>Anomaly message ends with<br/>[filter: contract = 'permanent']"]
Equivalent SQL
The situation: A reconciled net_amount must stay above a floor of 100, but the value accumulates rounding through several pipeline steps. A relative tolerance of 0.1% keeps that noise from firing while still catching real shortfalls. A cleanup is in progress, so the check tolerates up to 0.5% failures.
Check configuration
| Field | Value |
|---|---|
| Rule | Greater Than |
| Field | net_amount |
| Filter | (none) |
| Custom Anomaly Description | Off |
| Value | 100 |
| Inclusive | On |
| Numeric | Relative, 0.001 |
| Coverage | 99.5% |
| Owner | (check creator) |
| Anomaly Assignee | (Finance Data team) |
| Description | Reconciled net amount must be at least 100, within rounding tolerance. |
| Tags | finance, reconciliation |
| Additional Metadata | jira: DATA-8488 |
| Status | Active |
Payload
{
"description": "Reconciled net amount must be at least 100, within rounding tolerance.",
"rule": "greaterThan",
"fields": ["net_amount"],
"container_id": 733,
"coverage": 0.995,
"filter": null,
"properties": {"value": 100, "inclusive": true, "numeric_comparator": {"epsilon": 0.001, "as_absolute": false}},
"tags": ["finance", "reconciliation"],
"additional_metadata": {"jira": "DATA-8488"},
"anomaly_message_field": null,
"template_id": null,
"status": "Active",
"owner_id": 7,
"default_anomaly_assignee_id": 47
}
Sample Data
| settlement_id | net_amount | batch |
|---|---|---|
| S-01 | 149.90 | B-1 |
| S-02 | 99.95 | B-1 |
| S-03 | 62.10 | B-2 |
| S-04 | 0 | B-2 |
What gets flagged
S-02 is just under the floor but falls inside the 0.1% tolerance, so it passes. S-03 and S-04 miss by far more than the margin and fail. Only 50% of the rows pass, which is below the 99.5% coverage threshold, so the check reports a single Shape Anomaly for the dataset with a sample of the offending rows. Coverage below 100% does not produce Record Anomalies.
Shape Anomaly
For the field 'net_amount', 50.000% of 4 records (2) are not greater than 100
Flowchart
graph TD
A["No filter, evaluate all rows"] --> B["Read net_amount"]
B --> C{"Is value NULL?"}
C -->|Yes| D["Row passes"]
C -->|No| E["Add the 0.1% tolerance"]
E --> F{"Is the adjusted value >= 100?"}
F -->|Yes| D
F -->|No| G["Flag row.<br/>Passing rate falls below the 99.5%<br/>coverage, so one Shape Anomaly is reported."]
Equivalent SQL
See Also
-
How It Works
The complete reference: definition, field scope, the threshold, inclusivity, the numeric comparator, NULL handling, filter behavior, and coverage.
-
Anomaly Reporting
The anomaly messages the check produces, what the numbers mean, Source Records highlighting, and Custom Anomaly Description.
-
Best Practices
Guidelines for setting the threshold, using inclusivity and tolerance, and keeping the signal clean.
-
Permissions
The team permission each action needs: view, create, edit, archive, restore, and delete.