Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

Managing rules

Parent article

With Data Catalog's rules framework you can define, execute, and manage business rules. These rules can evaluate data and metadata properties to add terms, remove terms, modify custom propertie values, and perform several other updates on data assets.

To manage rules, click Management on the menu bar to open the Manage Your Environment page, and then click Business Rules.

On the Business Rules page, you can create, run, track, and manage all rules in the Data Catalog.

You can create business rules in two ways:

  • Create a new rule by entering the scope, action, and criteria for the rule in the Add New Rule page and save it.
  • Create a new rule by creating blocks for scope, criteria, and action. You can use these blocks any time later while creating a new rule using the Load option on the Add New Rule page. This is the recommended way that is optimized for re-usability.

When you create rules, they are translated automatically into concrete rules that are bound and executed on individual data resources. This translation occurs regardless of which format and platform the resource is in, such as JDBC tables, Hive tables, CSV, Avro, JSON, or any other file format that Data Catalog supports.

ImportantData Catalog uses the JDK regular expression (regex) engine to process regular expressions. When you are editing business rules, make sure your regular expressions conform to JDK regex syntax so Data Catalog can process them accurately.

You can view the following sample applications of the rules framework:

Using a rule for sensitive resource tagging

Many users create business rules to govern sensitive data. The following example identifies and tags all resources containing sensitive data or personal identifiers such as names and addresses. It could easily be modified to work with other sensitive data like social security numbers and account information.

Using the Data Catalog term discovery features, you can identify field metadata and tag data fields such as first name, last name, and address. The Data Catalog built-in terms can identify these fields. Then, you can use a rule to check for any resources that contain tagged sensitive data fields and tag the resources as "PII/Restricted Access".

The following rule example is term-based and does not depend on an actual field name, resource name, or resource type.

When you run the rule, it is applied to all qualifying resources and attaches the term you specify when a resource contains the sensitive fields and these fields have terms associated with them. If you have 100 CSV files, 200 JDBC tables, and 30 Avro files that are all sensitive, they are all labeled correctly after executing this rule.

Metadata rule with field term for sensitive data
Rule componentDefinition
Rule ScopeYou can define the following rule scope by simply clicking and selecting parameters using the scope building block.
  • Virtual folder
  • Resource term
  • Column term
  • Custom Properties
  • Term states
Rule Criteria hasFieldTerm(Built-in_Terms/First_Name)=1 AND hasFieldTerm(Built-in_Terms/Last_Name)=1 AND hasFieldTerm(Built-in_Terms/US_Address)=1
Rule ActionYou can tag associations, remove associations, set properties, reset properties, set term assignment state, compute data quality score, and set sensitivity level by simply selecting it using the Rule Action Block.

For example, to tag SSN field as PII/Restricted Access:

Select Action Type as: Add Business Term

Select Business Term as: PII/Restricted Access

Set Action Field as: SSN (this field is case-sensitive)

Set the threshold as needed.

Resource tagging based on data properties

You can use Data Catalog rules to create a simple data rule that defines the resources to which the condition applies, a condition, and then performs a specified action. In the following example, the rule attaches a resource term to all resources where the data for a given field falls within a specified condition and threshold range.

Data rule with resource term
Rule componentDefinition
Rule Scope

You can define the following rule scope by simply clicking and selecting parameters using the scope building block.

  • Virtual folder
  • Resource term
  • Column term
  • Custom Properties
  • Term states
Rule Criteria (rule body)

Country='Australia’ or Country= “Australia”

Here Country is the column name, and “Australia” is the value inside the column.

Use single quotation marks or double quotation marks to specify the value. It is recommended to use single quotation marks.

Rule criteria for data rules always examine the actual data of the given column.

Rule Action

You can tag or remove associations, set or reset properties, set data quality by selecting it using the action building block.

In this example, we will do the following:

Tag resource as DQM/CA_Employee:

Select Action Type as:Add Business Term

Select Business Term as: PII/Restricted Access

Keep Action Field empty

Set the threshold as needed.

Rule components

Metadata and data rules execute based on the defined rule criteria, scope, and action on all qualified data entities.

You must use the Data Catalog rules components, which provide constructions for expressing scope, criteria, and actions. You can define all these constructions based on actual business terms, field names, custom properties, and business term association states.

The rule components are:

  • Rule scope

    Sets the scope of resources on which the rule is evaluated and applied.

  • Rule criteria

    Defines the condition.

  • Rule action

    Defines the action to take on resources that conform to the rule's evaluation, such as add term, remove term, set custom property values, set quality dimension, set term assignment state, compute data quality score, and set sensitivity.

Rule scope

The rule scope defines the resources for rule execution. When configuring a rule, you can define the rule scope by specifying scope types in the Set Scope section.

  • Virtual folders

    You must include at least one virtual folder. When a single virtual folder is listed, rule execution is run against all the resources in the listed virtual folder. You can select multiple virtual folders from the navigation tree.

  • Resource terms

    You can select multiple terms from multiple glossaries in the navigation tree. Selecting resource terms narrows the scope to include only the resources (files and tables) that have the selected resource-level terms.

  • Column terms

    You can select multiple terms from multiple glossaries in the navigation tree. Selecting column terms narrows the scope to include only the resources (files and tables) that contain columns and fields associated with the selected terms..

  • Custom properties

    You can select custom properties from custom property groups in the navigation tree. Selecting custom properties narrows the scope to include only the resources (files and tables) that have the selected resource custom properties.

  • Term states

    You can further filter the resources based on the term association state. The possible values are ACCEPTED, REJECTED, and SUGGESTED. If you do not specify a term association state, then all states will be considered.

Rule criteria

The rule criteria define the rule that is translated and evaluated into a query for execution against every qualifying resource as defined in the rule scope. You can define the rule criteria by specifying the criteria block and later loading it into a rule or manually entering it while creating a new rule.

For example, you can insert a clause that determines what the rule body acts on. The query clause determines if the rule acts on metadata or actual resource data.

ImportantData Catalog uses the JDK regular expression (regex) engine to process regular expressions. When you are editing business rules, make sure your regular expressions conform to JDK regex syntax so Data Catalog can process them accurately.
  • Metadata query using resource metadata

    For example, the rule criteria hasFieldTerm(Built-in_Terms/Social_Security_Number_Delimited) = 1 checks for the presence of the field term Built-in_Terms/Social_Security_Number_Delimited.

  • Metadata query operating on custom property

    For example, the rule criteria @@business= 'MagnUX' operates on custom properties looking for the value of 'MagnUX'.

    NoteThe inclusion of "@@" indicates the rule is used for custom properties and is a metadata rule.
  • Data query using resource data

    The data query operates on field terms in combination with field values. For example, the rule criteria (@EMS/Category >= 100 and @EMS/Category <= 199) and @EMS/Tax_State = '6A' inspects the data in the field tagged with EMS/Category for values between 100 and 199, when the data in the field tagged with EMS/Tax_State has a value of "6A".

    Data query can also operate on field values alone. The data query rule can directly act on the real values of the field and column. For example, if a field name is Country and it has the value USA, then criteria for DataRules query is: Country = ‘USA’.

    NotePrefixing a fully qualified field term with an "@" indicates the rule operates on the data tagged by the glossary and term.

Depending on the rule type, the following ruleCriteria queries are possible, where FieldTerm is a fully qualified term name including the domain that it is associated with:

  • Data query:

    Inspects the data of the file when evaluating the rules. Data query identifies the associated fields and checks the data of those fields.

    Example of a fully qualified term name: If the user has Glossary as HomeInsurance and Term as State-NJ, then the fully qualified name of the Term is HomeInsurance/State-NJ

Data queryDescription
  • ruleCriteria:

    Country in(' USA', 'Australia', 'Japan') and 'Insurance Type'= 'Auto'

Evaluating data in fields.
  • ruleCriteria:

    @Domain1/Term1 = "someValue" ruleCriteria:@Domain1/fieldTerm1 >= 100 and @Domain1/fieldTerm1 <= 199) and @Domain1/fieldTerm2 = “some_value”

Evaluating data in fields with terms.
  • ruleCriteria:

    length(Username) > 10 ORlength(@Domain1/Term1)> 10

Evaluating the length of field values.
  • ruleCriteria:

    UserIDisunique

Evaluating the uniqueness of a field.
  • ruleCriteria:

    Usercontainsall(‘John’, ‘Matt’, ‘Winston’)

Evaluating all the given values in the mentioned column.
  • ruleCriteria:

    @Domain1/ParentTerm1.childTerm >=100 and @`Domain name1/field Term2` = “value”

Evaluating data in fields with nested terms and terms with spaces.

  • Metadata query:

    Evaluates against metadata discovered by Data Catalog.

NoteData Catalog data types differ from the original data types used in databases and file systems. For example, int data type can be represented as Integer in Data Catalog data type. You can view Data Catalog data types under Data Canvas > Resource > Details tab.
LogicQueryParametersApplicable to

Metadata Rules

MatchMetadataNamehasMetadataName(LDC Data Type, Name/Regex)=1

Example: hasMetadataName(boolean, IsRatingFinished)=1

Regex example:hasMetadataName(boolean,`.*RatingFini.*`)=1

  • Type

    DataSource /VirtualFolder /ResourcePath / ResourceName / FieldPath / FieldName

  • Name/Regex

    Regular expression to match name or entire name

Rule /Term discovery

(In Rule execution datasource, virtualFolder are not applicable).

MatchFieldNamehasFieldName(Name/regex)=1

Example: hasFieldName(CreditCard)=1

Regex example:hasFieldName(`CreditCa.*`)=1

  • Name/Regex:

    regular expression to match name or entire name.

Rule /Term discovery
MatchFieldTypehasFieldType(DataType,Name/Regex)=1

Example:hasFieldType (LDC data type, CreditCardNumber)=1

Regex example: hasFieldType (long, `CreditCa.*`)=1

  • DataType:

    dataType of the field

  • Name/Regex:

    regular expression to match name or entire name

NoteIf second option is not mentioned it checks if any field in the column is having that data type or not.

Rule /Term discovery

matchFieldAssociationProximityhasTermProximity(fully qualified term name1, fully qualified term name2) >=2

Example: hasTermProximity(Built-in_Terms/First_Name, Built-in_Terms/Last_Name) <=2

Fully qualified Term name1

Fully qualified Term name2

Rule
matchFieldProximityhasFieldProximity(field1,field2)= Proximity Value(distance between two fields)

Example:

hasFieldProximi(Firstname, Lastname)<=2
  • field1:

    field1 Name/fieldPath

  • field2:

    field2 Name/fieldPath

  • Proximity:

    distance between two fields.

Rule /Term discovery

matchOrdinalhasOrdinal(fieldname,ordinal)=1

Example:

hasOrdinal (Firstname,2)=1
  • fieldName:

    field name/ field Path

  • ordinal:

    position number

Rule /Term discovery
hasFieldTermhasFieldTerm(fully qualified termName)=1

Example: hasFieldTerm (Built-in_Terms/Country)=1

  • termName:

    1 fully qualified name of the term

Rule/Business Entity
hasAcceptedFieldTermhasAcceptedFieldTerm(termName)=1

Example:hasAcceptedFiel dTerm(Built-in_Terms/Country)=1

  • termName:

    fully qualified name of the term

Rule
hasResourceTermhasResourceTerm(termName)=1

Example: hasResourceTerm(Builtin_Terms/Country)= 1

  • termName:

    fully qualified name of the term

Rule/Business Entity
matchTermFieldProximityhasFieldTermProximity(termName1, termName2, proximity)=1
  • termName1:

    fully qualified name of the term

  • termName2:

    fully qualified name of the term

  • proximity:

    distance between two field terms(integer)

Rule /Business Entity
metadataSelectivityhasStatistic(statistic name,Fieldname/regex)=1

Example: hasStatistic(Selelctivity,Country)>=28

Regex example: hasStatistic(Selelctivity,`.*ountr.*`) >3

  • name:

    can be one of the below values(selectivity/ cardinality/ stringMin/ StringMax/NumericMin/NumericMax

  • Fieldname/regex:

    regular expression to match name or entire name

Rule /Term discovery
metadataCardinalityhasStatistic(name,Fieldname/regex)=1

Example: hasStatistic(Cardinality,Country)<=10

Regex example: hasStatistic(Cardinality,`.*ountr.*`) >= 3

  • name:

    can be one of the values: selectivity/ cardinality/ stringMin/StringMax/NumericMin/NumericMax

  • Fieldname/regex:

    regular expression to match name or entire name

Rule /Term discovery
metadataStringMinhasStatistic(name,Fieldname/regex)=1
  • name:

    can be one of the values: selectivity/cardinality/ stringMin/StringMax/NumericMin/NumericMax

  • Fieldname/regex:

    regular expression to match name or entire name

Rule /Term discovery
metadataStringMaxhasStatistic(name,Fieldname/regex)=1
  • name:

    can be one of the values: selectivity/ cardinality/ stringMin/ StringMax/NumericMin/NumericMax

  • Fieldname/regex:

    regular expression to match name or entire name

Rule /Term discovery
metadataNumericMinhasStatistic(name,Fieldname/regex)=1
  • name:

    can be one of the values: selectivity/ cardinality/ stringMin/ StringMax/NumericMin/NumericMax

  • Fieldname/regex:

    regular expression to match name or entire name

Rule /Term discovery
metadataNumericMaxhasStatistic(name,Fieldname/regex)=1
  • name:

    can be one of the values(selectivity/ cardinality/ stringMin/ StringMax/NumericMin/NumericMax

  • Fieldname/regex:

    regular expression to match name or entire name

Rule /Term discovery
lastProfiledTimeStamp hasLastProfiledTimestamp (``) >= 1 timestampvalue in "dd-mm-yyyy hh:mm:ss" format.

Example:

hasLastProfiledTimestamp(``)  > "10-01-2022
      02:22:45"
  • timestamp:

    value in timestamp

Rule /Term discovery
Unstructured:
ContainsTermhasFieldTerm(termName)=1
  • termName:

    fully qualified name of the term

Rule
DocumentType (Jpeg, video, etc.)hasDocumentType(Type)=1
  • Type:

    type of the document

Rule
Data Quality:
Field’s Quality ScorehasFieldQuality(FieldName/Regex)=1
  • Fieldname/regex:

    regular expression to match name or entire name

Rule
Resource’s Quality ScorehasResourceQuality()=1No parameterRule
Term Metadata Rules:
termConfidence valueshasTermConfidence(field/Regex)=1
  • Fieldname/regex:

    regular expression to match name or entire name

Rule

Rule action

The rule action defines the action to take if the rule criteria evaluates to true. A rule action has an array of actions, and each action performs a task. Actions can be one of the following:

  • AddBusinessTerms
  • RemoveBusinessTerms
  • SetProperties
  • ResetProperties
  • Set Quality Dimension
  • Set Term Assignment State
  • Compute Data Quality Score
  • Set Sensitivity

You can define the rule action by specifying action types in the Rule Actions window. The supported rule action types are described below.

  • Add Business Term

    When actionType is set to AddBusinessTerm, the ruleAction makes term associations based on rule evaluation. A term suggestion can be applied on a specific field or on a qualifying resource. When applying a term suggestion of a field, the field is identified with a full field name. You can add multiple terms in AddBusinessTerms rules.

    NoteThe Data Catalog rule framework does not create new terms. Any term suggestions to be applied as part of rule action must be for existing terms. If an associated term does not exist, Data Catalog displays an error message.
  • Remove Business Term

    When actionType is set to RemoveBusinessTerm, the ruleAction removes the term associations based on the rule evaluation.

  • Set Properties and Reset Properties

    When actionType is set to SetProperties or ResetProperties, the ruleAction sets or resets custom property values.

    Property values are strings. If you specify property names with @@, then the value of its string is substituted for the property name. You can specify multiple property values in the Add Property Value section. Each property value should be comma (,) separated and without any trailing space.

    You can use property actions to set and reset property values. To reset a property value, use ResetProperties.

  • Set Quality Dimension

    When actionType is set to SetQualityDiemnsion, the ruleAction defines the quality dimension. You can specify the following quality dimension with threshold value range (Low Threshold and High Threshold).

    The supported quality dimensions are:

    • Accuracy
    • Completeness
    • Consistency
    • Timeliness
    • Uniqueness
    • Validity

    Specify the field name if the associated action is to be performed at the field level. If the field name is not specified, then the action will be performed at the resource level.

    NoteThis action requires a non-metadata criteria to execute because it evaluates the actual data of the column.
  • Set Term Assignment State

    When actionType is set to SetTermAssignmentState, the ruleAction updates the business term assignment state. You can specify one or multiple terms whose assignment state to be changed. If no term is selected, then the selected assignment state is applied to all the terms associated with the resource.

    The supported business term assignment states are:

    • Accept & Use In Learning
    • Accept & Don’t Use In Learning
    • Reject & Use In Learning
    • Reject & Don’t Use In Learning

    Use In Learning is only applicable at the column level. At the resource level, it is only Accept and Reject

    NoteThis action requires a metadata criteria in the rule to execute.
  • Compute Data Quality Score

    When actionType is set to ComputeDataQualityScore, the ruleAction computes the data quality score based on the provided data quality dimension values.

    When you select the Compute Data Quality Score as the rule action type, the template for the score formula is provided in the Score Formula field. You can customize the template formula by changing the dimension weightage values as per the requirement.

    Score formula template:

    GUID-005EB1E5-AB38-47FA-BCCC-80A21E685FD2-low.png

    Data quality score formula conditions:

    • The column-level entity should have at least one calculated dimension for the action to execute.
    • If the rule provides weightages to multiple dimensions, and actual entity has only one dimension, then 0 will be considered as the value for the other dimensions.
    • The formula should have at least one dimension and all the weights provided should sum up to 1.0.

      A valid formula with weights specified for Accuracy, Completeness and Uniqueness quality dimensions:

      GUID-3BC50D44-D0AE-47FA-80D2-10764A0E929C-low.png

    Data quality score calculation process:

    Data quality score is calculated based on the Quality Dimension Weightage specified in formula and Calculated Value Set defined for the quality dimension.

    Data quality score calculation process is stated below with an example:

    Data quality score formula:

    • Accuracy*0.5 + Completeness*0.20 + Uniqueness*0.30

    Calculated value set:

    • Accuracy: 60
    • Completeness: 80
    • Uniqueness: No calculated value is set for Uniqueness. The default value for Uniqueness will be 0.

    Data quality score calculation:

    • [60*0.5 + 80*0.2 + 0*0.3] = 46
    NoteThis action requires a metadata criteria in the rule to execute.
  • SetSensitivity

    When actionType is set to SetSensitivity, the ruleAction updates the resource sensitivity level. This is applicable only at the resource level . If the resource name is not provided, then the action will change the sensitivity level of all the resources defined in the rule scope and criteria.

    If multiple sensitivity rules are executed for a particular resource, then the sensitivity level defined in the latest rule is considered, overriding all the previous rules.

    The supported business term assignment states are:

    • Low
    • Medium
    • High
    • Non Sensitive
    • Unknown
    NoteThis action requires a metadata criteria in the rule to execute.

Requirements for writing rules

You can avoid errors by adopting the following requirements when writing rules:

  • When using terms in the ruleCriteria for a data query, you must prefix the terms with the @ symbol and then the glossaryname/termname qualifier. In the absence of the @ qualifier, a term glossaryname/termname is interpreted as a column name which may or may not exist and the corresponding results may be misreported.
  • When evaluating rules to set custom properties, you must prefix the custom property with the @@ qualifier.
  • Data Catalog supports minimal SQL functions in the rule definition such as AND, OR, <, >, IN, and length().
  • All terms specified in the actionAttribute field need to pre-exist.
  • The rule syntax requires that you replace the dot in <termDomain>.<Term> with a forward slash. For example, enter Built-in_Terms/Last_Name instead of Built-in_Terms.Last_Name. This replacement applies to all sections of the rule.
  • For terms or a glossary with spaces, enclose the term between single quotation marks. For example: @`Glossary name/Term name` > 200
  • To use field names with spaces, enclose the term between single quotation marks. For example: hasFieldName(`First Name`)=1
Data Catalog's rules framework does not create new terms. It only attaches an existing term to the resource or field specified.

Rule workflow

On the Business Rules page, you can create, update, edit, and delete rules.

Create a rule

Perform the following steps to create a new rule. After you create a rule, you can then run the rule using Execute rules.

Procedure

  1. Click Management on the menu bar to open the Manage Your Environment page, and then select Business Rules to open the Business Rules page. Click Add Business Rule.

    The Create Business Rule page opens.
  2. Enter the rule name and description.

  3. Set the Rule Scope. The rule scope includes the following parameters:

    You can create your own scope and save it for future use by yourself or another user or select one of the existing ones using the Load Scope option.

    • Virtual Folders

      Select virtual folders on which the rule should be executed. You must include at least one virtual folder for the rule to compile. When a single virtual folder is listed, rule execution is run against all the resources in the listed virtual folder. You can select additional virtual folders. If a folder no longer exists when the rule is executed, it is ignored.

    • Resource Terms

      Select business terms to filter the virtual folder resources.

    • Column terms

      Select the business terms associated with the fields or columns to filter the virtual folder resources.

    • Custom Properties

      Select the custom properties to filter the virtual folder resources.

    • Term State

      You can further filter the virtual folder resources based on the term association state. The possible values are ACCEPTED, REJECTED, and SUGGESTED. If you do not specify a term association state, all states are included.

  4. Set the Rule Criteria.

    You can create your rule criteriaand save it for future use by yourself or another user or select one of the existing ones using the Load Scope option.

    Define the rule's criteria for evaluation using rule syntax, with MetadataRule or DataRule. See the following examples:

    • MetadataRule

      For dealing with metadata stored in the database. Syntax is:

      • hasResourceTerm(TermFullyQualifiedName) =1

        Work on the resources that have the given resource term associated with them. For example, hasResourceTerm(Insurance/HomeOwners.State_VA)=1

      • hasFieldTerm(TermFullyQualifiedName) =1

        Work on the fields and columns that have the given field term associated with them. For example, hasFieldTerm(Insurance/HomeOwners.State_VA)=1

    • DataRules

      For dealing with actual data present in the resource. Syntax is to specify the column name directly or use @TermFullyQualifiedName equivalent to the field with the given term name. Use @@customPropertyName to specify the custom property with specific values.

    NoteAll Quality Dimensions are generated only with DataRules.
  5. Set the Rule Actions. The rule actions include the following action types.

    You can create rule actions and save them for future use by yourself or another user or select one of the existing ones using the Load Scope option.
    Action TypeDescription
    Add Business Terms
    • Business Term

      Select the term name that you want to add.

    • Action Field

      Specify the field name if the associated action should be performed on a specific field. The field name specified is tagged with the term provided in the Add Business Terms.

      If the field name is not specified, then the action will be performed at the resource level.

    • Set Threshold

      Specify the threshold value at which to perform the rule action.

    Remove Business Terms
    • Business Term

      Select the term name that you want to remove.

    • Action Field

      Specify the field name if the associated action should be performed at the column level. The field name specified is tagged with the term provided in the Remove Business Terms.

      If the field name is not specified, then the action will be performed at the resource level.

    • Set Threshold

      Specify the threshold value at which to perform the rule action.

    Set Properties
    • Select Property

      Select the property for which you want to set the custom properties.

    • Action Field

      Specify the field name if the associated action should be performed on a field.

    • Add Property Value

      Specify the property value. You can specify multiple property values. Each property value should be a comma (,) separated and no trailing space.

    • Set Threshold

      Specify the threshold value at which to perform the rule action.

    Reset Properties
    • Select Property

      Select the property for which you want to reset the custom properties.

    • Action Field

      Specify the field name if the associated action should be performed on a field.

    • Set Threshold

      Specify the threshold value at which to perform the rule action.

    Set Quality Dimension
    • Set Quality Dimension (for DataRules)

      Select the data quality dimension that defines your rule. This dimension is reflected in the data quality graph on the Data Canvas page. Options include:

      • Accuracy

        The degree to which data correctly describes the "real world" object or event being described.

      • Completeness

        The proportion of stored data against the business definition of “100% complete”.

      • Consistency

        The absence of difference when comparing two or more representations of an item against a definition. Each data item is measured against itself or its counterpart in another data set.

        Note that consistency assessment may not be applicable to all data items.

      • Timeliness

        The degree to which data represent reality from the required point in time. This is measured by the time distance between each correct and incorrect data point.

      • Uniqueness

        The inverse of an assessment of the level of duplication.

      • Validity

        Data is valid if it conforms to the syntax (format, type, range) of its business definition. Typically, this value is the overall measure of data quality.

    • Action Field

      Specify the field name if the associated action should be performed at the column level. The field name specified is tagged with the term provided in the Set Quality Dimension.

      If the field name is not specified, then the action will be performed at the resource level

    • Set Low Threshold

      Specify the threshold value at which to perform the rule action.

    • Set High Threshold

      Specify the threshold value at which to perform the rule action.

    You can view the following data quality color range in a donut chart for the column.

    • > High Threshold = green
    • > Low Threshold and < High Threshold = orange
    • < Low Threshold = red

    For example, If you want to validate the number of records with the state name California.

    To validate this, you have selected Validity as a quality dimension. Suppose there are a total of 500 records for states; out of these, you want to see records with the state name California.

    Now, consider that out of 500, we have 50 states with the name California. This is 10% as a validity percentage.

    Now in the threshold field, if you set the low threshold as 0 (zero) and the high threshold as 9. In this case, 10 is greater than the high threshold, so the data quality chart will show green.

    If you set a low threshold as 0 (zero) and a high threshold as 15. In this case, 10 falls between 0 and 15, so the data quality chart will show orange.

    If you set the low threshold as 11 and the high threshold as 15. In this case, 10 falls below the low threshold, so the data quality chart will show red.

    Similarly, you can set the threshold value for all the data quality dimensions.

    SetTermAssignmentState
    • Set Term Assignment State (for MetaData Rules)

      Set the assignment state of a term.

    • Select Term

      Select one or multiple terms for which you want to change the assignment state. If the term is not specified, the selected assignment state is applied to all the terms associated with the resource.

    • Assignment State

      Select the assignment state. The supported term assignment states are:

      • Accept & Use In Learning
      • Accept & Don’t Use In Learning
      • Reject & Use In Learning
      • Reject & Don’t Use In Learning
      NoteUse In Learning is applicable at the column level only. At resource level, it is Accept and Reject only.
    ComputeDataQualityScore
    • Compute Data Quality Score

      Computes the data quality score based on the provided data quality dimension values.

    • Score Formula

      When you select the Compute Data Quality Score as the rule action type, the template for the score formula is provided in the Score Formula field. You can customize the template formula by changing the dimension weightage values as per the requirement.

      Score formula template:

      Accuracy*0.17 + Completeness*0.17 + Consistency*0.16 + Timeliness*0.16 + Uniqueness*0.17 + Validity*0.17

      Data quality formula condition:

      • The column level entity should have at least one calculated dimension for this action to execute..
      • If the rule provides weightages to multiple dimensions, and actual entity has only one dimension, then 0 will be considered as the weightage value for the other dimensions.
      • While defining the formula, there should be at least one valid dimension, and the sum of all dimension weightages should equal to 1. Greater than 1 or less than 1 is not acceptable.

        Example of a valid formula:

        Accuracy*0.5 + Completeness*0.20 + Uniqueness*0.30

    • Action Field

      Specify the column name if the associated action should be performed only on a specific column, instead of applying the weights on all the columns of the applicable resource.

      Examples of a valid formula used in the Action Block:

      Accuracy*0.5 + Completeness*0.20 + Uniqueness*0.30

      Accuracy*0.2 + Completeness*0.1 + Consistency*0.1 + Timeliness*0.1 + Uniqueness*0.4 + Validity*0.1

    SetSensitivity
    • Set Sensitivity

      Updates the resource sensitivity level. If multiple Sensitivity rules are executed for a particular resource, then the sensitivity level defined in the latest rule is considered, overriding all the previous rules.

    • Sensitivity Level

      Specify the sensitivity level. The supported sensitivity levels are:

      • Low
      • Medium
      • High
      • Non Sensitive
      • Unknown
    • Action Item

      Specify the resource name if the associated action should be performed on a resource. If the resource name is not provided, then the action will change the sensitivity level of all the resources defined in the rule scope and criteria.

  6. Click Create Rule.

Update a rule

If you have already created and configured a rule, you can edit it from the Business Rules page.

Perform the following steps to edit a rule:

Procedure

  1. Click Management on the menu bar to open the Manage Your Environment page, and then select Business Rules to open the Business Rules page.

    The Business Rules page opens.
  2. Locate the business rule you want to configure in the table of rules and select the View Details button (greater-than sign) in its row.

    If you have a large number of rules, select Show Filters to help you find the rule you want to edit.The Business Rule page opens for the selected rule.
  3. Edit the fields as needed and click Save Rule.

    The rule is saved with your changes. If there is a problem while creating your rule, an error notification displays at the top of the page. Resolve the error and click Save Rule.

Update a rule created using rule blocks

If you have created and configured a rule using Scope, Action, and Criteria blocks, you can edit it from the Business Rules page

Perform the following steps to edit a rule:

Procedure

  1. Click Management on the menu bar to open the Manage Your Environment page, and then select Business Rules to open the Business Rules page.

    The Business Rules page opens.
  2. Locate the business rule you want to configure in the table of rules and select the View Details button (greater-than sign) in its row.

    If you have a large number of rules, select Show Filters to help you find the rule you want to edit.The Business Rule page opens, highlighting the block that is used for the selected rule..
  3. If you want to update the rule block used in the rule, click on the specific block name link (which can be Rule Scope, Rule Criteria, or Rule Actions).

    You will be navigated to the specific block page.
  4. Edit the fields as needed and save the changes.

    The rule will be updated with the block changes.

  5. If you do not want to update the pre-saved rule block currently in use, but you want to change its scope,criteria, and action, then you do one of the following:

    • You can either load a different rule block by clicking the load button on the top right of the scope, criteria, or action component.
    • Update the block on the Update Business Rules page. This will create a new block instead of updating it. You can save this new block with the new name.
    If there is a problem while modifying the block, then an error notification is shown at the top right corner of the page.

Delete a rule

If a rule is no longer needed, you can delete it. Perform the following steps to delete a rule:

Procedure

  1. Click Management on the menu bar to open the Manage Your Environment page, and then select Business Rules.

    The Business Rules page opens.
  2. Use the check box to select the rule you want to delete.

  3. Click the Actions menu and then click Remove. Optionally, select the More actions icon, then click Remove from the drop-down menu.

    A message appears prompting you to enter the text Yes to delete the rule.
  4. Enter Yes in the input field and click Confirm.

    A message appears confirming that the business rule is deleted.
  5. Click Close on the message box to return to the Business Rules page.

View rules

You can view the list of all the rules in Data Catalog.

Perform the following steps to view the rules:

Procedure

  1. Go to Management and click Business Rules.

    The list of all rules in Data Catalog is shown.
  2. To view the rules associated with the specific resource. Navigate to Explore Your Data > Virtual folders > Specific file.

  3. Click Rules tab.

    Rules specific to that file are shown.View rules

Adding rule blocks

You can create a scope, criteria, and actions block and use it anytime later while creating a rule.

Perform the following steps to create a block:

Procedure

  1. Go to Management and click Business Rules.

  2. Click the Blocks tab.

  3. Click Add New Block, and select the scope, criteria, or actions for which you want to create a block.

    NoteIf you make any changes to the block, the rules that are using these blocks are impacted.

Execute rules

Perform the following steps to execute a Data Catalog rule.

  1. Go to Management and click Business Rules.
  2. Select the rule you want to run and click the Execution tab.

    The Execution Schedule window opens. You can run the rule immediately or add a schedule.

  3. Select Run Now to run the rule immediately.
  4. Click Add Schedule to schedule the rule and select one of the following schedules:
    • On a date
    • Daily
    • Weekly
    • Monthly

    NoteSet the schedule time in UTC zone only.
  5. (Optional) If you want to enter parameters, select the Advanced Mode check box, and enter the parameters in the text box.

    For example, to generate a rule execution report, enter the following additional parameters before rule execution:

    -generateReport true -reportName <Name of the report being generated>

    For more information on additional parameters, see Rule execution report.

  6. Click Apply Changes.
Propagate bindings

Propagate bindings associates the rule with all the data entities that fall under the selected resources.

On the Execution Schedule window,click Propagate Bindings to associate the rule with the data entities.

You will receive notification about the propagate binding status. After completing it, you can go to each data entity and run the rule as required. With propagate bindings, owners of data entities have an option to run the rule or not.

Rule execution report

A rule execution report is a report of all the rules that summarizes how well a rule evaluates the resources in Data Catalog.

To generate a rule execution report, enter the following additional parameters before rule execution:

-generateReport true -reportName <Name of the report being generated>

Define the options as follows:

  • -generateReport

    If this parameter is passed, rule execution generates a report with the name specified by the -reportName parameter.

  • -reportName

    User-defined name for the report being generated. Use with the -generateReport parameter.

All reports are generated in the /var/log/ldc/generatedReports directory. If you do not provide a report name, Data Catalog randomly generates a unique name for each report.