Skip to content

What is a raw dataPoint validator?



raw validators raw validators

Raw dataPoint 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 raw 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>
                    <rawDPValidators>
                        <rawDPValidator name="INVALID_IF_NULL_CHECK" entity="NOT_NULL">
                                <lateBound>false</lateBound> // This is the default value if one is not specified
                        </rawDPValidator>
                    </rawDPValidators>
                </dataPoint>
            </dataPoints>
        </schema>
    </schemas>
</apiroConf>

When a feed is processed by the schema, the validator will validate the data and, as in the case below will throw a violation if the data does not pass the validation process. Given below is an example of what a raw violation looks like in the Apiro UI:


Raw violation UI example


The status for this row will also appear as violated:


Status = violated example


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 raw dataPoint validators: