What is a consolidated data point validator?
Consolidated data point validators test the validity of data given to dataPoints.
If the value in a dataPoint does not pass a validation, then a datablock violation is thrown and it becomes violated.
This validation process is done in the consolidated validation pipeline stage.
Below is an example of a NOT_NULL validator used within a schema dataPoint. It will check if the value of the BID dataPoint is not null.
If the validator finds that the value of BID is null then a violation is thrown.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 | <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<apiroConf fragmentId="elecdemo">
<loadOrder>10</loadOrder>
<schemas>
<schema defBacked="false" historical="true" name="ASX20_PRICING">
<groupTags>
<groupTag>PRICING</groupTag>
</groupTags>
<rateKeys>
<rateKey>code</rateKey>
</rateKeys>
<dataPoints>
<dataPoint name="code" dataType="STRING" displayName="code">
<nullable>false</nullable>
</dataPoint>
<dataPoint name="BID" dataType="DOUBLE" displayName="BID">
<nullable>false</nullable>
<consDPValidators>
<consDPValidator name="INVALID_IF_NULL_CHECK" entity="NOT_NULL">
<config>{}</config>
</consDPValidator>
</consDPValidators>
</dataPoint>
</dataPoints>
</schema>
</schemas>
</apiroConf>
|
When a feed is processed by the schema, the validator will validate the data and will throw a violation if the data does not pass the validation process.
NOTE: anywhere where {} with empty "{}" brackets appear, assume that config is optional and can be ignored in the majority of cases. The same applies where no element is shown in configuration.
Existing consolidated data point validators: