Use Variable Domains for Calculated or Injected Values

Created by Alexandru Sirbu, Modified on Thu, 26 Mar at 12:45 PM by Alexandru Sirbu

Variable Domains are Domains that do not correspond to columns in the source dataset. They are calculated or assigned during Business Rule processing - for intermediate computations, accumulated results, or Data Link lookup outputs. They are automatically excluded from Mappings.


Problem Overview

Complex data quality pipelines often require intermediate values that are derived from source data rather than read from it directly - a computed risk classification, a normalized lookup result, or a flag set by one rule and checked by several downstream rules. Without a dedicated place to store these values, two problematic workarounds emerge: repeating the same calculation in every rule that needs the result, or adding columns to the Mapping that have no corresponding column in the source dataset, which confuses anyone working on the pipeline integration.


Solution

Variable Domains are Domains with the Is Variable toggle enabled. They behave like any other Domain in Business Rule conditions and actions, but with several key differences:

  • Excluded from Mappings: They do not appear in the Mapping configuration and do not require a corresponding source column. Mappings stay clean
  • Assignable via Actions: Any Business Rule Action can set a Variable Domain. Once set, its value is available to all subsequent rules in the Rulebook sequence
  • Can have a Default Value: If no Action sets the Variable Domain during an execution, the configured Default Value is used. This is useful for flag Domains that start as false and are set to true only when a specific condition is triggered
  • Hidden in Preview by default: Variable Domains are not shown in the Preview data table by default. Add them via the Domain Selection control in the Preview toolbar when debugging.


Combined with Dataflow Rules, Variable Domains enable patterns like: compute a classification in a preparation step, store it in a Variable Domain, and then route subsequent validation rules based on that Domain's value - all within a single Rulebook.


Configuration

  1. Switch to Edit Version mode and open the Domains tab
  2. Click Add Domain
  3. Name the variable
  4. Select the appropriate data type
  5. Enable the Is Variable toggle
  6. Optionally set a Default Value
  7. Save.

Give it a meaningful, distinguishable name that reflects its purpose - for example, 'VAR_RiskScore', 'VAR_LookupResult_Country', or 'VAR_IsSeniorEmployee'. A naming convention like 'VAR_' makes Variable Domains immediately recognizable in Business Rule dropdowns.



Observe

Variable Domains are visible in the Domain Statistics tab of the Execution panel like any other Domain, and can be toggled on in the Preview table via Domain Selection. Inspecting their values row by row in the Row Result drawer is the best way to verify that intermediate calculations and routing logic are working correctly before releasing a Knowledge Base to production.


If you have any further questions, please feel free to Contact Us.

You can also refer to the HEDDA.IO End User Documentation.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article