Accelerate the Value of Data

Define Validation Function

Data validation function can be defined on single or nested attributes only.

Create Data Validation Functions (DVFs) for entity and relationship type attributes. Each DVF can contain these attributes: name, expression, action, and message.

Note: After adding or editing a validation function, the system takes five minutes of refresh time to update the changes.
Use either of these methods to define Data Validation Functions:

Defining Validation Functions in Reltio UI

Manage validation functions for your tenant in the Console Data Validation Functions Editor, which provides a function builder to transform business requirements into data validation functions. For more information about defining validation functions using the Reltio UI, see topics Create DVFs in the Data Modeler and Create a revalidate job.

Defining Validation Functions using APIs

This table describes validation function attributes you specify in APIs. For more information on using the Data Validation Function APIs to create, update, retrieve, and delete validation functions, see the Developer portal.

Table 1. List of Attributes in Validation Function
AttributesRequired/OptionalDescription
uriOptionalThis is a unique identifier that is automatically generated by the system. If a particular URI is provided then that validation function is updated.
nameRequiredThis is the name of the validation function.
labelOptionalIf the label is not provided, then the value provided for the name attribute is considered for the label attribute.
descriptionOptionalThis indicates the brief description of the validation function. If the description is not provided, then the value provided for the label attribute is considered for the description attribute.
expressionRequiredThis indicates the actual expression of the validation function containing the operation or condition name, and the validation input parameters. It can contain one or more operations or conditions with one or more logical operators (AND/OR). For more information, see Understanding the Expression Attribute.
actionOptionalThis indicates the next course of action when the data validation function is violated, either ERROR or WARNING (the default).
Note: If parent entity, child entity, or relationship attributes encounter an error, the entire profile won't load.
validationEventOptionalThis indicates the value of the Validation event field in the Create new validation function page:
  • ALL (the default): if you select Create & update profile.

  • CREATE: If you select Create profile.

  • UPDATE: If you select Update profile.

For more information, see topic Create DVFs in the Data Modeler.

messageRequiredThis indicates the message that is displayed when a validation warning is reported.
attributeRequiredIn case of multiple attribute expression, this indicates the attribute to which the warning message must be added.
createdBySystem generated response fieldThis indicates the user who created the validation function and is automatically picked up while creating the function.
createdTimeSystem generated response fieldThis indicates the time at which the validation function was created.
updatedBySystem generated response fieldThis indicates that the user updated the function and is automatically picked up while updating the function.
updateTimeSystem generated response fieldThis indicates the time at which the validation function was updated.
statusSystem generated response fieldThis indicates the status of the validation function:
  • ACTIVE (default): if you don't specify a value, the DVF status is active.

  • INACTIVE: Specify this to make the DVF status inactive.

Sample Validation Function

[
  {
    "name": "HCP.FirstName.01",
    "expression": "regexp(attributes.FirstName.value, '[a-zA-Z0-9]+')",
    "message": "FirstName cannot have special characters.",
    "attribute": "configuration/entityTypes/HCP/attributes/FirstName"
  },
  {
    "name": "HCP.CreditScore.01",
    "expression": "(equals(attributes.Status.value, 'Active') AND gte(attributes.CreditScore.value, '150') ) OR  Not equals(attributes.Status.value, 'Active')",
    "message": "HCP credit score should be greater than 150 for active profiles.",
    "attribute": "configuration/entityTypes/HCP/attributes/CreditScore"
  }
]

DVF responses

When a record is successfully saved, the value of the successful field is set to true in the response.
{
"index": 0,
"successful": true, //successful=true means the profile is saved successfully.
"object": {
"uri": "entities/09Owxbk",
"type": "configuration/entityTypes/HCP",
"createdBy": "thirupathi.reddy@reltio.com",
"createdTime": 1574831965997,
"updatedBy": "thirupathi.reddy@reltio.com",
"updatedTime": 1574831965997,
"attributes": {
"FirstName": [
{
"type": "configuration/entityTypes/HCP/attributes/FirstName",
"ov": true,
"value": "AAA2",
"uri": "entities/09Owxbk/attributes/FirstName/1BkE09Cq"
}
],
. . .
},
"isFavorite": false,
"crosswalks": [
{
"uri": "entities/09Owxbk/crosswalks/1BkE0ppQ",
"type": "configuration/sources/Reltio",
"value": "09Owxbk",
. . .
}
],
"analyticsAttributes": {},
"label": "AAA2 BBB2",
"secondaryLabel": ""
}
}
            
            
When a record is rejected, the value of the successful field is set to false in the response, which contains one or more validation errors or warnings.
{
"index": 0,
"successful": false, //successful=false means the profile is not saved due to some errors.
"errors": {
"severity": "Error",
"errorMessage": "The profile has failed against one or more DVF Functions.",
"errorCode": 31010,
"errorDetailMessage": "The profile has failed with 1 DVF error(s) and 6 DVF warning(s). Please review the
below validation errors and correct the data accordingly.",
"foundErrors": [
{
"severity": "ERROR", 
"errorMessage": "Identifier is required one", 
"errorCode": 31010,
"errorDetailMessage": "Identifier missing description", //3. Description from validation function
"exception": "Identifier missing" //4. Validation function name
},
{
"severity": "WARNING",
"errorMessage": "desc missing",
"errorCode": 31010,
"errorDetailMessage": "",
"exception": "desc"
}
],
"innerErrorData": {..}
},
}
The value in the following fields depend on values in the in the Edit validation function page:
  • severity: Depends on the value in the Validation level field.

  • errorMessage: Depends on the value in the Display error with message field.

  • errorDetailMessage: Depends on the value in the Description field.

  • exception: Depends on the value in the Name field.