Ruleset Files
A ruleset file (.ruleset) is essentially a collection of rules, organized by Data Type and Field Name Pattern. These rules can be applied to any data profile that contains fields of the specified data type and field names matching the defined pattern.
The ruleset file is not provided by default, but you can create one. There is no limit to the number of .ruleset files you can create, and they can be manually edited if needed.
The saved rules within a ruleset file can be quickly added to a profile (
Import Ruleset) and conversely, existing rules within a profile can be saved to a ruleset file (
Export Ruleset). When you add rules from a ruleset file to a profile, a copy of the rule is created and added to the profile. This enables you to modify the rules within the profile without affecting the original rule in the ruleset file.
When adding a rule within a ruleset file, the user must specify both a data type and a corresponding field name pattern. There is a structured association between data types and profile rules. Each data type is supported by a distinct subset of profile rules, ensuring that the application of rules remains contextually appropriate. For instance, a rule designed for date data types is restricted from being applied to numeric fields. This behavior ensures that each rule is applied only to the data types for which it was specifically designed, enhancing the accuracy and reliability of ruleset file rules.
Note that rules that are added in a ruleset file operate differently from rules that are added in a profile. When you add a rule within a profile the rule resides in that profile, and is associated with a particular field of a connected data source or a derived field. Whereas when you add a rule to a ruleset file, the rule is not part of any profile, nor is it associated with any particular field of a connected data source. Instead, the ruleset file rules are associated with a data type and field name pattern that you specify. This way, the ruleset rules can be applied to any number of datasets that have a datetype/field pattern match.
To manage where the ruleset files are stored, you can set the Ruleset Files Location preference (see
Setting Data Profile Preferences). This preference defines the default save location for .ruleset files and is used when loading or saving rules through browse dialogs. Centralizing your rules in a dedicated location not only enables rule reuse across multiple profiles but also eliminates the need to recreate them each time. You can also browse to a different location during ruleset import or export, if needed.
Some key concepts related to ruleset files are:
• A ruleset file consists of one or more collections of rules.
• Each rule collection contains a group of rules relevant to a specific data type and field name pattern. Thus a rule collection can be applied to fields of a specified data type with names that match a specified named pattern.
• The Field Name Pattern represents the specified value used to identify similarly named fields in the source dataset. Field name patterns allow for wildcard matching using the asterisk (*) character. This feature is particularly useful when reusing profile rules through a ruleset file, as it allows a single rule to match multiple similar fields (for example, *name will match first_name, middle_name, and last_name) when applying the ruleset file rules to a profile. The field name patterns are case insensitive.
Refer to the following topics for more information:
Import Ruleset
The Import Ruleset functionality allows you to add rules from a ruleset file (.ruleset) to your profile.
A ruleset file (see
Ruleset Files) is essentially a collection of rules, organized by
Data Type and
Field Name Pattern. These rules can be applied to fields of a specified data type, where the field names match the defined pattern. You can add rules from a ruleset file to your profile (
Import Ruleset) and also save rules from a profile back into a ruleset file, making them available for future use across different profiles (
Export Ruleset).
To import rules:
1. Open an existing profile and select the Rules tab.
2. Click

.
The Import Rules wizard is displayed.
3. Click Browse and select the location of the .ruleset file.
The default browse location is what has been set in the Ruleset Files Location preferences (see
Setting Data Profile Preferences). This location setting is used when loading or saving ruleset files through browse dialogs.
4. Select the ruleset file.
The profile engine analyzes the data types and field names in the source dataset to identify matches with the Data Types and Field Name Patterns from the selected ruleset file rules. This matching process ensures that only valid rules are applied to the corresponding fields in the source dataset. For instance, a rule designed for date data types is restricted from being applied to numeric fields.
5. Review the Matching Fields and Rule Types to identify which ones might be useful.
6. Edit the rule parameters.
The parameters associated with a rule are displayed on the right hand side. You can select a rule and edit the rule parameters before importing them. If there are rules of the same type, they can be selected and edited together. This will not affect the contents of the ruleset file. See
Rule and Parameter Reference.
Note that the rules are organized based on the Data Type and the Field Name Pattern. The data type determines which fields the rule can be applied to. The field name pattern represents the specified value used to identify similarly named fields in the source dataset. This allows for matching similar field names. The Field Name Patterns are case insensitive.
If there are rules with missing parameters, appropriate validation messages are displayed.
7. Select the Matching Fields and Rule Types for which rules should be created.
8. Click Finish
The Import Rule wizard closes, and the selected rules are added to the profile. A default rule name is provided which follows the <FieldName>_<RuleType> format. For example, City_IsNotBlank. If multiple identical rules exist for the same field, only one will be added. You can also edit the added rules in the profile editor.
Note: The underscore (_) character is the only special character allowed in the name. Rule names cannot begin with a digit. If a field or column in the source data starts with a digit, 'r_' will be prepended to any rules created based on that field.
Tip... To undo and redo this action, select Undo/Redo from the Edit dropdown menu (at top left) or click Ctrl+Z/Ctrl+Y (respectively).
Export Ruleset
The Export Ruleset functionality allows you to create a ruleset file (.ruleset) by exporting rules from an existing profile.
A ruleset file (see
Ruleset Files) is essentially a collection of rules, organized by
Data Type and
Field Name Pattern. These rules can be applied to fields of a specified data type, where the field names match the defined pattern. You can add rules from a ruleset file to your profile (
Import Ruleset) and also save rules from a profile back into a ruleset file, making them available for future use across different profiles (
Export Ruleset).
To export rules:
1. Open an existing profile and select the Rules tab.
2. Click

.
The Export Rules wizard appears, listing all profile rules available for export. Note that MultiFieldRules, Data prep rules, invalid rules, and rules with other field dependency are excluded from the list.
3. Select the rules to be saved to the ruleset file and click Next.
Note: You can select or deselect all rules using Select All and Unselect All.
4. Specify a filename to create a new ruleset file or click Browse and select an existing file.
The default browse location is what has been set in the Ruleset Files Location preferences (see
Setting Data Profile Preferences). This location setting is used when loading or saving ruleset files through browse dialogs.
5. (Optional) Select Append rules if file exists to append new rules to an existing file or else the ruleset file will be overwritten.
6. Edit the field name pattern and the rule parameters.
Note that the rules are organized based on the Data Type and the Field Name Pattern. The data type determines which fields the rule can be applied to. By default the associated field is displayed as the field name pattern but you can edit it to make it more generic. The field name pattern represents the specified value used to identify similarly named fields in the source dataset. To enable field name pattern matching, add an asterisk (*) as a wildcard before or after the field name pattern value. This allows for matching similar field names. The Field Name Patterns are case insensitive.
The parameters associated with a rule are displayed on the right hand side. You can select a rule and edit the rule parameters before exporting them. If there are rules of the same type, they can be selected and edited together. See
Rule and Parameter Reference.
If there are rules with missing parameters, appropriate validation messages are displayed.
7. Select the rules to be saved to the ruleset file and click Finish to export rules.
The Export Rules wizard is closed and you are returned back to the profile editor.