Rules/RuleSets

On this page of ADOC, you can create rules to be included in the Data Quality policy that will apply to all qualifying assets. Ensure the same tag is assigned to the rule as is applied to all qualifying assets.

To create a rule, navigate to the Manage Policies page by selecting Reliability from the left pane and clicking the Rules/RuleSets tab, then click the Create Rule button.

Users with view-only permissions will not have access to the Create Rule and Create Rule Set buttons.

Understanding the Rules Tables

The table on the Rules/RuleSets Page displays details of each rule created. Below are the descriptions of each column:

Column NameDescription
Rule nameThe name of the rule.
TypeThe type of the rule. Example, Null Check, Enumeration, Schema Matching etc.
DetailsThe tags used in the rule.
Last UpdatedThe date and time when the rule was last updated.
Rule SetsThe number of rule sets to which the rule is added. Clicking on the count displays the details of the rule set to which the rule belongs to.
PoliciesThe number of policies to which the rule is added.
Created ByDisplays the email address of the user who created the rule.
Delete and ellipsis menuThe delete icon allows you to delete a rule. The ellipsis menu provides you options to edit the rule, duplicate the rule, add the rule to a rule set, and view the list of rule sets to which the rule belongs to.

How to Create a Rule?

To create a rule, perform the following steps:

  1. Click Create Rule.
  2. Enter a name for the rule in the Name field.
  3. (Optional) Enter a description for the rule in the Description field.
  4. Select the rule type from the Rule Type drop-down menu.

Based on the rule type you select; you need to specify values for some of the additional fields. To learn more about Data Quality policy rules, see Data Quality Policy.

  1. Add the tag to the rule. This tag must be the same tag which is added to all the qualifying assets. You can add multiple tags, if needed.
  2. Select either All or Any in the Tag Match Condition field. This is applicable if you have added multiple tags. If you select the All option, only those assets which match all the tags are selected as qualifying assets. If you select the Any option, if an asset matches even a single tag, it is considered as a qualifying asset.
  3. Click Save.
Create Rule Page

Create Rule Page

Rule Sets

A rule set is a group of rules. You must add the rules to a rule set to apply them on a data source.

You cannot apply a rule directly on a data source. To access the rule set page, click the Rule Sets tab on the Rules page.

The Rule Sets page displays the list of rule sets created in a table. The table has the following columns.

Column NameDescription
Rule Set NameThe name of the rule set.
CategoryThe policy type to which the rule set belongs to.
Last UpdatedThe date and time when the rule set was last updated.
RulesThe number of rules present in the rule set.
PoliciesThe number of policies covered by the rule set.
# of SchedulesThe number of schedules for the rule set.
Created ByDisplays the name of the user who has created the rule.
Delete and Ellipsis Menu

The delete button allows you to delete a rule set. The ellipsis button allows you to:

Edit: You can edit a rule set

Duplicate: You can now duplicate a selected rule set

Apply Rule Set: Apply the selected rule to the rule set to a data source

Schedule Rule Set: Schedule a Rule set by selecting the option

View Rules: View the rules associated with the ruleset

View Schedules: View the Rule Set Application Schedule

How to Import a Rule Set?

To import a rule set, perform the following steps:

  1. Click the Import Rule Set button. The Import Rule Sets modal is displayed with the following steps to perform.
  1. Click Start to drag and drop a file of either zip or gz file extension type or browse from your system files and click Upload.
  1. Take action for rule sets found with same name on target assets. You can either Override the existing rule set with the one being imported or select Do not import. Note On selecting do not import none of the rule sets get imported.
  1. Click Next. A successful import message is displayed. You must wait for the imports to happen.

How to Apply Rule Set?

To apply a rule set, follow the below steps:

  1. Click the ellipsis button of the rule.
  2. Select Apply Rule Set.
  1. Select the source type to which the rule set must be applied in the Apply ruleset to field. This can either be a Data source, Database, Schema, or Big Query Dataset. While users can apply rule sets based on asset-level permissions, the actual creation of policies depends on domain-level policy permissions. If a user does not have the required permissions, policies may still be created, but they will not be visible to that user.
  2. Select the name of the Data source, Database, Schema, or Big Query Dataset to which the rule set must be applied.
  1. Click Apply.

When applying a rule set, policies may be created even if the user does not have explicit permissions to create policies on the selected assets. However, these policies will not be visible to the user unless they have the necessary permissions.

Example Scenario:

A user has permission to view and apply the rule sets on certain assets. They apply the rule set to the database. The rule set is successfully applies and policies are created in the system.

However, due to domain level RBAC restrictions, the users does not have permission to create or view policies in the database. As a result even though the rule was applied successfully, the user cannot see the newly created policies.

If you cannot see the policies after applying the rule set, verify your permissions for policy creation and visibility with your administrator.

How to Schedule a Rule Set?

  1. Click the icon and select the Schedule Rule Set option. The Schedule Rule Set modal is displayed.
  2. Provide a name for the schedule.
  3. Select a group of assets to apply the selected rule set. For example, if you have selected data source, then select the data sources to apply the selected rule set to.
  4. Enable the toggle button to automatically enable all created policies.
  5. Select the time or day unit that you want to apply on the ruleset such as Minute, Hour, Day, Week, Month, or Year.
  6. Click the Apply button to schedule to the rule set.

How to View Rules?

To view rules associated to the rule set, do the following:

  1. Click the vertical ellipsis icon and select View Rules option. A modal is displayed with the following details:
    1. Name: Name of the rule.
    2. Applied By: The method in which the rule was applied. Example: Tag Based.
    3. Type: Type of rule applied. Example: Missing_Values, Distinctness_Check
    4. Created On: The date and time the rule was created.

How to View Schedules?

To view schedules of a rule set, do the following:

  1. Click the vertical ellipsis icon and select View Schedules option. A modal is displayed with the following details:
    1. Name: Name of the schedule.
    2. Schedule: The schedule time.
    3. Enabled: A toggle displaying if the schedule is enabled or not.

Bulk Policies

Adding multiple data sources to ADOC can be time-consuming. Manually adding policies to assets can be cumbersome. ADOC's Bulk Policies feature simplifies this process by creating rules for data quality, grouping them, and applying them to data sources. ADOC automatically creates a Data Quality policy and applies the rules to assets matching a tag-based condition.

The Bulk Policy functionality now automatically transfers descriptions and metadata from the defined rule set to the created policies and rules. It eliminate the need for manual metadata updates, ensuring complete annotation of both policies and individual rules with essential information.

The user can access the description and metadata directly from the rule definition and policy panels, which improves visibility and traceability.

Terms Associated with Bulk Policies Feature

Before we proceed further, it is important to understand the following terms related to the Bulk Policies feature.

  • Qualifying Assets: The qualifying assets are the assets on which quality policies need to be created and rules need to be added to all the policies. These assets would be referred to as qualifying assets through out this document.
  • Bulk Policies: The data quality policy created on all the qualifying assets.
  • Rule: The rule that must be added to all the quality policies which are created automatically, on the qualifying assets.
  • Rule Set: A rule set is a group of rules. You must add a rule to a rule set to use this feature. Rule sets can now automatically propagate metadata and descriptions to their associated rules and policies.

Consider that you have an asset (a database Table). This Table has a primary key column whose values cannot be NULL. The primary key column of this Table is used in multiple Tables (as a foreign key). You also need to ensure that the range of values does not exceed a certain limit for any of the column values. You need to create a Data Quality Policy on all the assets (Tables) which have this column and then add the Null Check rule and Range match rule to all the policies.

You can use this feature to create a null check rule and a range match rule. Once you create the rules, you can add them to a group. You can apply the rule group to all the required assets. Once you apply it to the assets:

  • Data Quality policy is created on all the assets automatically.
  • Both rules are added to all the data quality policies automatically.
  • The established policies and rules automatically propagate the descriptions and metadata set on the rules, making it simple to identify and manage the implemented rules.

How Bulk Policies Work?

The following steps outline how the Bulk Policies feature operates:

Tag Management: ADOC provides a Tags page where you can manage tags. You can apply several out-of-the-box ADOC tags to assets based on a regular expression match. You also have the option to create custom tags tailored to your organization’s requirements using regular expressions. Once these expressions apply a tag to the relevant assets, those assets qualify for bulk policies. For more information, see Tags.

Create Rules: After applying tags to the qualifying assets, you can define the rules that should be enforced on those assets. You must link rules to the same tag as tag management. Once you have created all the necessary rules, incorporate them into a rule set before applying it to a data source. For more information, see How to Create a Rule?

Create a Rule Set: You can apply a Rule Set to data sources, datasets, schemas, or Big Query datasets. All policies and rules generated from the rule set automatically apply the metadata and descriptions defined at the rule set level, ensuring full annotation of each policy and rule.

Apply Rule Set: You can apply the completed rule set to a specific data source. In addition to data sources, ADOC allows you to apply rule sets to datasets, schemas, or Big Query datasets. During this process, ADOC automatically includes the metadata and descriptions defined at the rule set and rule levels, ensuring that the policies and rules generated from the rule set are fully descriptive and traceable. For more information, see How to Apply Rule Set?

Rule Set Jobs: After applying the rule set to a data source, you can monitor the process in the Rule Set Jobs page. This page displays details such as the number of assets scanned, the number of policies created, and other relevant status information. Each job created is named after the rule set and tracks the rule set application across different data sources.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard