Calculation Rules
You can configure the data quality steps according to your needs.
The ranges
are defined by the from
and to
values. Those values are inclusive.
The defined colors
are used to color the data quality steps in the backend (e.g. in the Data Object tree). Please make sure that you provide the HEX color codes with a leading #
as shown in the example.
Configuration Reference
#config/pimcore/config.yaml
pimcore_data_quality_management:
ranges:
A:
from: 100
to: 90
B:
from: 89
to: 70
C:
from: 69
to: 50
D:
from: 49
to: 0
colors:
A:
mark: '#5A7900'
background: '#6FC177'
outline: '#698D00'
B:
mark: '#A48000'
background: '#F5C746'
outline: '#B89A00'
C:
mark: '#AE5400'
background: '#F5931A'
outline: '#BE7E00'
D:
mark: '#830000'
background: '#F03835'
outline: '#A30000'
recalculation:
batchSize: 10000
Ranges must cover all together the whole range from 0 to 100.
Configuration for Recalculating the Data Quality Score
The data quality score is automatically calculated after saving a Data Object. In the meantime, all the existing scores are recalculated after some specific changes in your class definition.
The relevant changes include:
- Adding a new data quality type.
- Removing a data quality type.
- Changing the configuration of a data quality type.
- Changing the precondition.
One exception: if a data quality type is configured to use the Object Validation
rule, the data quality score will be recalculated on every update of the class definition.
If you want to use the same behavior for your custom rule definition, you can use the forceRecalculation
method. You can find an example in the Custom Rule Definition section.
If you want to recalculate the score for all the Data Objects via a command, you can use the following:
bin/console dqm:score:recalculate
You can pass one or more Data Object id(s) with the --objectIds
option:
bin/console dqm:score:recalculate --objectIds=1,2,3
If you want to recalculate the score for all the Data Objects of a specific class, you can use the --class
option:
bin/console dqm:score:recalculate --classIds=CAR
The recalculation is based on the Symfony messenger queue. You can define the amount of Data Objects saved per Symfony message by using the following config value (Default value: 10 000):
#config/pimcore/config.yaml
pimcore_data_quality_management:
recalculation:
batchSize: 10000
If you made some changes to the class definition, please make sure to restart the Symfony workers first.