User Community Service Desk Downloads

Create Detection Rule

Detection rules automate the process of applying terms to your data catalog. They define the conditions that determine when specific terms should be applied to attributes. This guide walks you through creating and configuring detection rules.

Before you begin, decide whether your rule should be based on metadata (like attribute names) or data values (like content patterns). This choice affects how you’ll configure the rule logic.

Create rule

Start by setting up the basic rule configuration.

  1. Navigate to Glossary > Detection rules.

  2. Select Create.

  3. On the Create Rule screen, provide the following information:

    • Name: Choose a descriptive name that explains what the rule detects.

    • Description (optional): Explain what the rule does and when it should be used. This helps other team members understand the rule’s purpose.

    • Input type: Choose the detection approach:

      • Select Data to evaluate actual data values. Use this when you want to detect patterns, formats, or content within the data itself.

      • Select Metadata to evaluate catalog information like attribute names, descriptions, or source details. Use this when the attribute name or location indicates the term that should be applied.

    • Stewardship (recommended): Select the user group responsible for maintaining this rule. After selecting a group, you’ll see the users assigned to governance roles within that group.

      Creating a new detection rule
  4. Select Save to create the rule draft.

  5. Before you can publish the rule, you need to define the detection logic. Continue to Define rule implementation.

You cannot change the input type after creating the rule. If you select the wrong type, delete the rule and create a new one.

Define rule implementation

After saving your rule draft, you’ll be redirected to the Overview tab. Select Go to implementation to configure the rule logic.

Navigate to rule implementation

The implementation process varies depending on your input type:

  • Data rules require you to specify input attributes, create variables (optional), and define conditions

  • Metadata rules work directly with catalog metadata and skip the input attribute selection

Input attributes (data rules only)

If you created a data rule, start by defining the input attributes that the rule will evaluate.

Configuring rule inputs
  1. Select the attributes you want the rule to analyze (at least one is required).

  2. Optionally add variables to transform the data before evaluation.

The inputs you define become available for building conditions in the Rule logic section.

Naming your inputs
  • Input names don’t affect how the rule works, but they make the logic easier to understand.

  • Use descriptive names that clearly identify what each input represents.

  • If you use special characters or reserved words, enclose them in square brackets to avoid publishing errors.

Variables (Optional)

Variables let you transform your input data before applying rule conditions. This is useful when you need to clean or modify data for more accurate detection.

For example, you might create a variable that trims whitespace from string attributes, then apply your rule conditions only to the trimmed version.

To create variables:

  1. Choose a descriptive name for your variable. Select Add variable if you need additional variables.

  2. Select the input attributes you want to transform. Use the dropdown to choose from your defined input attributes.

    For advanced users: select Advanced Expression from the dropdown to define transformations using ONE expression language.

  3. Add transformations using Add transformation. Available transformations depend on the attribute’s data type.

Applying multiple transformations

You can apply multiple transformations to a single attribute, but they must follow a logical sequence.

For example, if you convert a string to an integer, you can’t then apply string-specific transformations like "Uppercase."

You can only remove the last transformation in a sequence. To remove a transformation, hover over it and select the x to delete it.

Available transformations

The transformations you can use depend on your data type:

Data type transformations
Data Type Available Transformations Description

String

To float

Converts string to float.

To integer

Converts string to integer.

To long

Converts string to long.

Uppercase

Converts all characters to uppercase.

Lowercase

Converts all characters to lowercase.

Trim

Removes spaces from both ends.

Squeeze spaces

Removes extra spaces and trims whitespace.

Remove non-digits

Keeps only digit characters.

Remove non-letters

Keeps only letter characters.

Integer

To float

Converts integer to float.

To date

Converts integer to date.

To long

Converts integer to long.

Boolean

To String

Converts Boolean to string.

Date

To datetime

Converts date to datetime.

To string

Converts date to string.

Datetime

To date

Converts datetime to date.

To string

Converts datetime to string.

Long

To float

Converts long to float.

To string

Converts long to string.

To date

Converts long to date.

To datetime

Converts long to datetime.

Float

To string

Converts float to string.

Floor

Rounds down to nearest integer.

Ceiling

Rounds up to nearest integer.

Round

Rounds to nearest integer.

Rule logic

This is where you define the conditions that determine when the rule should apply a term to a data asset. You have two options for creating these conditions.

Choose your approach

Condition builder

Use predefined options and dropdown menus to build your logic. This approach is easier for most users and covers common scenarios.

Condition builder interface
Advanced expression

Write custom logic using ONE expression language. This gives you maximum flexibility but requires technical expertise.

Advanced expression interface

Using Advanced Expression

If you choose Advanced Expression:

  1. Write your detection logic using ONE expression language syntax.

  2. Test your expression to ensure it works correctly.

  3. Proceed to Test Rule.

Using Condition Builder

If you choose Condition Builder:

  1. Select what you want to evaluate:

    • For data rules: Choose an input attribute or variable you created

      Data-based rule inputs
    • For metadata rules: Choose metadata fields like attribute_name, source_name, or catalogItem_description

      Metadata-based rule inputs
  2. Apply modifiers if needed (like Trim or Round). Available modifiers depend on your input data type.

    Metadata rules only support string modifiers since metadata is typically text-based.

    Available Modifiers
    Modifier Description

    Value

    Uses the original value without changes.

    Uppercase

    Converts text to uppercase.

    Lowercase

    Converts text to lowercase.

    Trim

    Removes whitespace from both ends.

    Trim left

    Removes leading whitespace.

    Trim right

    Removes trailing whitespace.

    Squared

    Squares numeric values.

    Round

    Rounds to nearest whole number.

    Average

    Calculates average (for grouped data).

    Min

    Finds minimum value (for grouped data).

    Max

    Finds maximum value (for grouped data).

    Sum

    Calculates sum (for grouped data).

  3. Choose a condition that defines when the rule should result in terms being applied. Available conditions depend on your data type.

    Available Conditions
    Condition Description

    Is empty

    When the field contains no data.

    This doesn’t detect common "empty" values like NULL, N/A, -, etc. Those are treated as actual content.

    Is not empty

    When the field contains any data.

    Is the same as

    When the value exactly matches your specified text.

    Is the same as attribute

    When the value matches the attribute you select.

    Is not the same as

    When the value doesn’t match your specified text.

    Is not the same as attribute

    When the value doesn’t match the attribute you select.

    Is from the following list

    When the value appears in your predefined list.

    Is not from the following list

    When the value doesn’t appear in your predefined list.

    Has length of

    When the text has a specific character count.

    Contains

    When the value includes your specified substring.

    Is from catalog item

    When the value exists in a reference dataset.

    Select ON DATA CHANGE in Data updates to keep the rule current with reference data changes. This option isn’t available for non-Reference Data catalog items.

    Is not from catalog item

    When the value doesn’t exist in a reference dataset.

    Matches mask

    When the value follows your specified pattern (like phone number format).

    Does not match mask

    When the value doesn’t follow your specified pattern.

    Matches regexp

    When the value matches your regular expression.

    Does not match regexp

    When the value doesn’t match your regular expression.

    Is true

    When a Boolean field is true.

    Is false

    When a Boolean field is false.

Test Rule

Before publishing, test your rule to ensure it works as expected.

  1. Select Test Rule to open the testing interface.

  2. Enter sample data that represents what your rule should evaluate.

  3. Review the results shown in the Message column next to each test input.

  4. Adjust your rule logic if the results don’t match your expectations.

Testing helps you catch logic errors and confirms that your rule will work correctly on real data.

Publish Rule

After testing and verifying your rule works correctly:

  1. Review all your settings one final time.

  2. Select Publish to make the rule active.

  3. The rule is now available to apply to terms and will begin detecting matches when term detection runs.

Once published, you can apply this rule to terms in your glossary to automate term assignment across your data catalog.

Was this page useful?