Create a Custom Consistency Check Rule
You can create custom consistency check rules based on your semantic model’s specific development standards. Creating custom rules saves you the effort of manually checking your model for specific issues.
The custom rules you create are included in the Custom Rules tab in the Semantic Modeler editor, and Semantic Modeler doesn't include custom rules when you run Check Consistency or Advanced Check. The custom rules that you assign to the Error category won't prevent you from running Advanced Check and deploying the model. See About Custom Consistency Check Rules.
- Rule Name - Specifies the name of the rule. This name is for custom rule management purposes only and displays in the Custom Rules tab. It doesn't display in the custom consistency check results.
- Error # - Specifies the error number to display in the custom consistency check results. An error number is a string and can contain numbers, letters, and characters. You can assign the same error number to more than one rule. For example, if you want to group rules under one error number.
- Category - Specifies if the rule is an error or warning. Error is the default. An error indicates a critical issue that the model developer must fix before deploying the model. A warning indicates an issue that the developer might need to fix. Because Semantic Modeler doesn't include custom consistency checks in Check Consistency or Advanced Check, checks that you label as errors won't prevent you from running an advanced check and deploying the model.
- Rule Enabled - Indicates if the rule is included when you run custom consistency check on the model.
- Description - Contains the developer's comments and information about the rule and is displayed only in the Custom Rules dialog when the developer modifies the rule.
- Message - Specifies the text to display in the Error Description column of the Custom Consistency Check tab when the check finds an instance of the error or warning. This message helps model developers understand the issue and how to fix it.
- JSONPATH Query - Contains the query's JSONPath syntax. See About Using JSONPath to Write Semantic Model Custom Rule Queries and JSONPath Custom Consistency Check Query Examples.
- On your home page, click Navigator
and then click Semantic
Models. - In the Semantic Models page, click a semantic model to open it.
- In the toolbar, click the down arrow next to Check
Consistency
and select Custom Rules.
- From the Custom Rules tab, click Create Rule.
- In the Custom Rules dialog, specify the rule's properties.
- In JSONPath Query, write the rule's query. Click Validate.
- Click Add.