Skip to main content
Version: Next

Calculation Rules

Configure the data quality steps to fit your needs.

ranges are defined by inclusive from and to values.

Two colors nodes configure the score marks:

  • studioColors colors the score badges rendered in Pimcore Studio (tree, grid and object editor). Each mark accepts a mark (font) and background color.
  • colors is kept for backward compatibility; it is not currently used to render anything in Pimcore Studio. Each mark accepts mark, background and outline colors.

Provide HEX color codes with a leading #, as shown in the example below.

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
studioColors:
A:
mark: '#104400'
background: '#DAECB8'
B:
mark: '#4D3C00'
background: '#FFE6A0'
C:
mark: '#5D1C00'
background: '#FFC786'
D:
mark: '#57000D'
background: '#E2B3B3'
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
caution

Ranges must together cover the whole range from 0 to 100.

Configuration for Recalculating the Data Quality Score

The data quality score is calculated automatically after saving a Data Object. Existing scores are also recalculated after specific class definition changes:

  • Adding a new data quality type.
  • Removing a data quality type.
  • Changing the configuration of a data quality type.
  • Changing the precondition.

Exception: if a data quality type uses the Object Validation rule, its score is recalculated on every class definition update. Use the forceRecalculation method to apply the same behavior to a custom rule definition; see Custom Rule Definition.

tip

Saving a class definition automatically signals running Symfony Messenger workers to stop (messenger:stop-workers) so they pick up the updated class metadata, regardless of whether the class uses Data Quality fields. Run workers under a process supervisor (Supervisor, systemd) configured to restart them automatically; otherwise recalculation processing stalls until the workers are started manually.

Recalculate the score for all Data Objects with:

bin/console dqm:score:recalculate

Pass one or more Data Object ids with the --objectIds option:

bin/console dqm:score:recalculate --objectIds=1,2,3

Recalculate all Data Objects of specific classes with the --classIds option:

bin/console dqm:score:recalculate --classIds=CAR

Recalculation runs on the Symfony Messenger queue. Configure how many Data Objects are processed per Symfony message with the following config value (default 10000):

#config/pimcore/config.yaml
pimcore_data_quality_management:
recalculation:
batchSize: 10000