Skip to content

CONSOLIDATED - REF INTEGRITY

Description

The REF INTEGRITY validator is designed to ensure that a field's value matches a given match in another schema and data dictionary. This validator is particularly useful for maintaining referential integrity across different data schemas and dictionaries, ensuring that data references are valid and consistent. It supports all primitive data types, making it versatile for various data validation needs.


Config Location

To configure the REF INTEGRITY validator, you need to define it within the consDPValidators section of your data point configuration within the schema. This involves specifying the validator name and entity.


Supported Data Types

  • Integer
  • String
  • Double
  • Decimal

Config Requirements

Config ({}) options are required for the REF INTEGRITY validator. If no configuration is provided or if the configuration is improperly set up, a block violation will be thrown. For more information on Apiro violations and their appearance in the Apiro UI or logs, refer to the violations section.


Example Config

Below is an example of how to configure the REF INTEGRITY validator in XML format. This example demonstrates a validator that checks if the "MY_DD" data point matches a given match in the specified schema and data dictionary.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<dataPoint name="MY_DD" dataType="DOUBLE">
    <consDPValidators>
        <consDPValidator name="CHECK_REF_INTEGRITY" entity="REF_INTEGRITY">
            <config>
                <![CDATA[
                    {
                         "schema" : "MY_SCHEMA",
                         "dataDictionary" : "MY_DD"
                    }
                ]]>
            </config>
        </consDPValidator>
    </consDPValidators>
</dataPoint>

Example Result

Upon successful configuration and execution, the REF INTEGRITY validator will check the current "MY_DD" value against the specified schema and data dictionary. If the value does not match a given match in the specified schema and data dictionary, a violation will be triggered, indicating that the value does not meet the criteria for acceptability.


Config Parameters

name acceptable values comment
schema A string representing the name of the schema to validate against. This defines the schema to check for referential integrity.
dataDictionary A string representing the name of the data dictionary to validate against. This defines the data dictionary to check for referential integrity.

Common Mistakes

  • Ensure that the validator name and entity are correctly defined in the configuration to ensure that the validator is correctly identified and applied during the data processing pipeline.
  • Verify that the configuration parameters within the <config> tag are correctly written and match the expected format and values.
  • Remember that the configuration for the REF INTEGRITY validator is required. If no configuration, or improper configuration is provided then a block violation will be thrown.