Attribute Comparison Metric

The Attribute Comparison Metric compares the values of two selected attributes based on an operator selected by the user, and returns a score of '100' (true) or '0' (false). Users are able to create an error message for instances when the metric returns a score of '0'; this message is meant to detail the reason for the '0' score and can have multiple translations.

Important: Metrics are used in conjunction with sufficiencies to determine the quality and completeness of a product's data. While this topic covers the functionality and configuration of the Attribute Comparison Metric, it is important that users are also familiar with sufficiencies and how they are combined with metrics. Information regarding sufficiencies can be found in the topic Sufficiency Configuration Type of the Data Governance documentation.

Prerequisites

Before metrics can be created, a Setup Group must be configured to hold them. For information on configuring a setup group for metrics, refer to the Initial Setup for Metrics topic. For information on creating a metric, refer to the Creating and Editing Metrics topic.

Configuration

  1. From the Edit Metric Configuration wizard, select 'Attribute Comparison Metric.'

  2. Click the selector button (), select the first and second attributes to compare and select an operator from the 'Operator' dropdown list. Once an operator is selected from the 'Operator' dropdown list, a default error message will appear in the 'Error Message' text field, based on the selected operator.

    Operator options include:

    • Equal to

    • Not Equal to

    • Contained in

    • Greater than - only available if the first attribute and/or second attribute has a value that is a number.

    • Less than - only available if the first attribute and/or second attribute has a value that is a number.

    In the example screenshot above, 'Length' is first attribute, 'Width' is the second attribute, and 'Equal to' is the operator. If the value for the first attribute is equal to the value for the second attribute, then the returned score will be '100' (true). If the value for the first attribute is not equal to the value of the second attribute, then the returned score will be '0' (false), and will be accompanied with a message, as displayed in the 'Error Message' text field.

    Note: An attribute that is not valid for a product not applicable for that product metric and no data quality information will be produced when the Sufficiency Data Calculator event processor is run. Furthermore, the metric only applies to attributes valid at the product object type level. For example, an attribute valid at the product object type level cannot be compared to an attribute valid for a data container on the product object type.

  3. Click the 'Error Message' editor button () to display the 'Edit messages' dialog which allows you to edit the error message and/or add additional translations.

    The 'Edit messages' window displays and the 'Message' text field is editable. Descriptive text below the text field describes in detail how the placeholders included in the error message work to create an error message. Although a default error message is suggested, users can edit the error message for the individual need.

    Note: Although the error message can be edited by the user, editing the 'attribute_id' and 'attribute_value' placeholders  results in a validation error message when attempting to save the edited message. When the metric is run, placeholders are replaced by the 'real values,' e.g., 'attribute_id' would be replaced with the ID of the attribute that the metric is evaluating.

  1. Open the 'Translations' section and click the 'Add translation' button ().

  1. Click the 'Language' selector dropdown and choose a language.

  2. In the Message parameter, edit the text to reflect the language specified for translation.

  3. Click the 'Add translation' button () to add another translation or click 'OK' to close the window.

  4. Click 'Save' to close the Edit Metric Configuration wizard and save the metric.

Note: Translation error messages are displayed by using locales; they are not context-dependent. For more information about locales, refer to the topic Localization in the Administration Portal documentation. For more information about localized messages, refer to the topic Localized Messages for JavaScript Business Rules in the Business Rules documentation.

Once the metric is added to a sufficiency and the sufficiency is run, the results are displayed in the sufficiency panel within the Web UI. In the example below, the Attribute Comparison Metric (for this example, titled 'AttMetComp') has been added to the sufficiency 'Product Measurement Requirements,' and returned a score of '0' because the attribute 'Length' value (9 in) is not equal to the attribute "Width' value (8 in), as detailed in the returned message.

Validation Errors

Validation errors can occur depending on the attributes selected for comparison. A validation error message will occur if:

  • The selected attributes have the same ID.

  • One selected attribute is multivalued and the other selected attribute is not multivalued.

  • One selected attribute includes a unit and the other selected does not include a unit of measure.

In the example below, the first attribute 'Length' has units, whereas the second attribute 'keywords' does not have units. Because of the incompatibility, a validation error occurs, with an error message that describes the reason for the error.

The following instances will also produce validation errors. However, these errors will not appear until the metric is run. The error message will appear in the Background Process Log of the Data Sufficiency Calculator event processor.

  • Both selected attributes have units, but one of the units does not have a set default unit, and no unit information is provided for the attribute value by the user (in the product).

  • Both selected attributes have units, but the units do not have the same base unit.

  • Both selected attributes have units, but one or both of the selected attributes do not have a base unit conversion rule.

For more information regarding units, including base units and conversion rules, refer to the Units topic in the System Setup documentation