Data Quality
Data Quality is a functionality within the Summary View widget, which provides a possibility to calculate and show the state of an item in terms of quality.
Quality, in terms of Data Quality functionality, means how many requirements an item meets. Requirements are, by default, represented by the validation constraints. Such solution extends the meaning of quality from just checking if necessary attributes contain a value, up to a complex checks of provided value quality like, for example, a number of referenced objects, if the description is long enough, if the product has a thumbnail assigned and more.
Data Quality Group enables users to define the Data Quality section in Summary View Widget and determines at which thresholds the quality of an item should be considered as a warning or an error.
How the quality information is calculated and which attributes or semantic of the data are considered is up to the implementation.
To know more about it, please, read the Coverage Calculation Framework document.
Data Quality Configuration
Below, you can see a code snippet containing a sample configuration of Data Quality Group for a Product item and a default domain.
cockpit-config.xml
<context type="Product" component="summary-view">
<summary-view:summary-view xmlns:summary-view="http://www.hybris.com/cockpitng/component/summaryview">
<summary-view:section name="QualityGroup">
<summary-view:data-quality-group warning="0.8" error="0.2" label="dataQualityGroupLabel" domain-id="default"/>
</summary-view:section>
</summary-view:summary-view>
</context>
It can be seen that the thresholds are, in this case, defined in the following way that if the quality is below 80 percent, but higher than 20 percent, it is a warning. If the quality is below 20 percent, it is an error.
Data Quality Renderers
Data Quality renderers get the Data Quality Group configuration and ask the calculation engine for results to show them in Summary View widget.
Data Quality section is grouped by domain-id. Any new and defined domain-id for a group may contain different sets of constraints, for example:
- Core Attributes - attributes related with the core product data.
- Marketing Attributes - attributes related with the marketing product data.
For any correctly configured Data Quality Group the components are rendered:
-
An extendable progress bar with a label above. The value presented in the progress bar indicates the overall index of quality (percentage) returned from the Calculation Framework.
Responsible renderer: com.hybris.cockpitng.widgets.summaryview.dataquality.renderer.DefaultDataQualityGroupRenderer -
Messages are presented according to the "Default error message" or "Error message" defined in the Constraint (Validation Constraint). Messages are only shown when Data Quality Group is expanded.
Responsible renderer: com.hybris.cockpitng.widgets.summaryview.dataquality.renderer.DefaultDataQualityPropertyRenderer
In case of Data Quality Group being incorrectly configured (domain-id does not exist) nothing is shown in Summary View widget and a warning is printed out in the console:
Data quality does not exist for domain "default" and object "Product".
Thresholds
Threshold values (warning, error) are rendered in a form of a style class. The Data Quality Group style class basis lays on the data quality index and defined thresholds.
Adding Group Coverage to Data Quality
Provide a custom configurable coverage group to Data Quality.
Context
It is possible to provide a custom configurable coverage group. It is done by defining the proper spring beans in the extension, defining a new CoverageGroup with a domainID equal to the one used in a bean definition, and defining new or using already existing constraints and adding them to the created group.

