Unify Logo Footer.svg
Unify Data
Logo
Detection Rules

Detection Rules

Logo

3 mins read READ

Detection rules teach the platform to recognize a kind of data — an email address, an order ID, a phone number — just by looking at its values or its structure. Once a business term references a detection rule, any field that matches the rule's pattern gets automatically tagged with that term during profiling and data discovery, so you don't have to label matching fields by hand.

Overview

You manage detection rules from Data Quality › Rules › Detection Rules. The manager lists every rule with an active/inactive toggle, its Rule Name, Status (Active, Inactive, or Draft), and Rule Type, along with Edit and Clone actions so you can reuse an existing rule as a starting point.

Data rules vs. Metadata rules

When you create or edit a rule, you first choose its Rule Type:

  • Data — evaluates the actual values inside a field, catching anomalies, outliers, and quality issues in the content itself. This is the type you'll use for most detection rules, since its conditions run against real field values.

  • Metadata — evaluates a dataset's structure and descriptive information, such as schema changes, rather than the values it holds. Choosing Metadata hides the inputs section entirely, since there are no values to define conditions against.

Pick the type based on what you actually want to catch: value patterns call for Data, structural or descriptive signals call for Metadata. See Notes below for an important limitation on Metadata rules.

How the Detect Term logic works

Every detection rule follows the same shape. Start by naming and describing the rule, then choose its rule type. For Data rules, you next define what the rule looks at:

  • Attributes — the typed fields the rule will examine.

  • Variables — an attribute combined with a transformation, such as Trim or Remove Non-Digits, so you can normalize a value before matching against it.

With inputs defined, you set the rule's logic as a set of WHEN conditions over those attributes and variables. Unlike other rule types, the outcome of a detection rule is always the same: Then Detect Term. A detection rule exists to answer one question — does this field's data match the pattern? — so there's nothing else to configure for the result.

When a field matches, the business term linked to that rule is applied to the field automatically, wherever profiling or discovery encounters it.

Testing a rule

For Data rules, use Test Rule in the editor's preview panel to check your logic before publishing. Add one or more test cases with sample values, select Run Test, and confirm whether each case detects as expected. For Metadata rules, the Test Rule button is disabled, since testing isn't available for that rule type.

Notes

  • Metadata-based detection isn't applied yet during term detection — only Data rules currently tag fields automatically. If a term is configured with only metadata rules, it won't auto-tag anything until this changes.

  • Keep each detection rule to a single attribute. Term detection evaluates one field at a time, so a rule that references multiple attributes — or none — is skipped entirely during detection. If you need logic spanning multiple fields, build it as an evaluation rule instead.

  • Detection is scoped by data type. A rule built around a String attribute is only ever tried against String-typed fields, so make sure your rule's attribute type matches the fields you expect it to catch.