Working with the Template Library page

Rule templates simplify rule authoring by providing a centralized library of reusable logic. You can create reusable rules to minimize the manual effort of applying similar data validation logic across multiple data sets.

Prerequisites

You have one of the following global permissions based on the actions you want to perform:

Action Permission requirement
View a rule template

Data Quality > Deploy Templates > Viewer

Create and edit a rule template Data Quality > Manage Templates > Creator

Adding a rule template

  1. On the main toolbar, click Products iconData Quality.
    The Monitoring Overview page opens to the available data sources in your environment, showing their high-level metadata.
  2. In the sidebar navigation on the left, click Template library.
    The template library opens.
  3. If necessary, filter the rule templates in the table using the filter options.
    ToleranceDescription
    Dimensions

    The type of issue to filter by, including Accuracy, Completeness, Consistency, Integrity, Validity, and Duplication.

    NameThe name of the rule template.
    DescriptionThe description of the rule template.
    Created byThe creator of the rule template. For out-of-the-box rule templates, this value is "Collibra".
    Search iconSearchSearch for a specific rule template.
    Filter iconShow/hide filtersShow or hide the filter options.
    Clear allClear the filter selections to show all results.
  4. Click Plus iconTemplate.
  5.  Enter the Name of the rule template.
  6.  Select the Primary dialect for the rule template you are creating. Default value is "Spark".
  7. From the SQL editor in the SQL tab, enter your SQL query.
    Tip 
    • By default, you cannot edit the SELECT * FROM {{dq-job-name}} WHERE clause.
    • The column variable must be represented as {{column}}.
    • When you deploy the template, the column variable parameter is automatically updated based on the primary column.
    • Templates currently support only one column variable parameter per template.
  8. Optionally, click Align left icon Format to automatically format the SQL for improved readability.
  9. Click Validate SQL to validate the syntax of your query.
  10. Optionally, select any additional supported dialects.
    1. Click Beak down icon next to each dialect to view or modify the SQL.
    2. To add an unsupported dialect, click Add dialect manually and enter the dialog and SQL in the modal. Click Save.
    3. Select all the appropriate dialects and click Approve selected.
  11. On the Settings tab, enter the rule template details.
    SettingDescription
    Data quality dimensionAssociate a rule with an out-of-the-box (OOTB) or custom dimension.
    Tolerance

    Define the minimum percentage of rule breaks that must be found to affect rule scores and statuses, and for any notifications tied to the rule to send. When a rule filter is applied, the percentage of rule breaks is calculated based on the filtered rows.

    Enter a value between 0 and 100.

    Note The value 0 is equivalent to not setting a rule tolerance threshold. This means that any percentage of rule violations will be considered a breach.

    DescriptionThe description of the rule template.
    Related assetsThe business asset(s) related to the rule template. You can select one or multiple assets.
  12. Click Save icon Save.
    The rule template is created.

Editing a rule template

  1. Select an existing rule template in the template library.
    The rule template SQL and Settings display in read-only mode. The Used In tab shows the rules that use the template.
  2. If necessary, select the Used In tab and click Detach from template to remove the connection between the template and the rule.
  3. Click Edit icon Edit.
    The rule template details display in edit mode.
  4. Edit the details as necessary.
  5. Click Save icon Save.
    The changes to the rule template are saved. The changes automatically apply to rules created from the template.
  6. If necessary, in the template library, click Delete to delete a rule template. You can't delete an OOTB rule template.

What's next