Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mangrovesystems.com/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks through creating a data rule end to end: choosing what to evaluate, setting the effective period, writing an expression, validating it, and saving.

Before you start

You need:
  • Write access to the project’s Data Rules. Ask an admin if the Add Rule button is greyed out.
  • A clear sense of the measurement or calculation you want to validate, and the threshold or pattern that defines a problem.

Step-by-step

1

Open Data Rules

Navigate to Project Settings → Data Rules. The Data Rules page lists every rule configured for the project, along with what it evaluates, its status, and the dates it applies to.Click Add Rule in the top right to start a new rule.
2

Choose what the rule evaluates

Pick a target for the rule:
TargetWhen to use
Event DataValidate raw measurements as events are created or updated. Best for catching ingestion-time errors (out-of-range readings, missing values).
Batch CalculationsValidate model outputs after a batch is generated. Best for catching downstream calculation issues (a CI score that drifts outside expected bounds).
  • For Event Data, optionally select an event type to scope the rule. Leaving this blank evaluates the rule against any event whose datapoints match the expression.
  • For Batch Calculations, select the model whose calculation results should be evaluated. The available variables come from that model’s nodes.
3

Set the effective period

Pick the dates the rule should apply to:
  • Effective from — the earliest date the rule applies to. Required.
  • Effective to — the date the rule stops applying. Leave blank for Ongoing.
When you save the rule, Mangrove evaluates every matching record within this range — both historical and going forward. Records outside the range are not touched.Use a bounded effective period when a check only applies during a specific reporting cycle or methodology version. Use Ongoing for evergreen data quality checks.
4

Write the rule expression

Use the rule editor to write the condition that should trigger an alert. Type {{ to open autocomplete and pick a datapoint slug or model node.
{{carbon_content}} not between 0.50 and 0.90
When the expression evaluates to true on a record, that record is flagged. See Rule Expressions for the full language reference and more examples.
5

Name the rule and write an alert message

Two short fields describe the rule to anyone who later sees it on a record or in the rules list:
  • Rule Name — a short identifier shown in the Data Rules list and in audit history (for example, “Carbon content cap”). Keep it brief and stable, even if you later edit the expression.
  • Alert Message — the human-readable explanation shown on each alerted record (for example, “Carbon content out of range”). Defaults to a humanized version of the rule expression; edit it to read more naturally for the people triaging alerts.
The Alert preview underneath shows how the alert will appear when the rule triggers.
6

Validate the rule

Click Validate Rule to check the expression. Mangrove will:
  • Confirm the syntax parses correctly
  • Confirm every variable resolves to a real datapoint or model node
  • Run the rule against recent project data and show a Results Preview of records that would have been flagged
If validation fails, the editor highlights the issue. If validation succeeds and the preview shows unexpected matches, refine the expression and validate again.
7

Save and run the rule

Click Save Rule. Mangrove confirms the effective range and evaluates every matching record within it — both historical and going forward. Records outside the range are left untouched.
8

Confirm the rule is active

After saving, you land on the rule detail page. The header shows the rule status, its effective period, and a list of any matching records found during evaluation.The rule is now live: every new event or batch generation within the effective period will run the expression and raise an alert if it matches.

Editing a rule

Open a rule from the Data Rules list and click Edit. Changing the expression saves a new version and archives the previous one — historical results stay tied to the version that produced them. When you save an edit, Mangrove re-evaluates matching records within the effective period. To stop a rule from applying to new data, shorten its Effective to date instead of editing the expression.

Archiving vs deleting

ActionEffect
ArchiveStops the rule, hides its alerts from records, and preserves history for audit. Use for rules that have produced results.
DeletePermanently removes the rule and its evaluation results. Only available when the rule has never produced a result, or you accept that the results will be deleted with it.