Skip to main content

When working with Reference Data table there may be a business requirement to control what kind of values can be input into a given attribute which are checked whenever a user creates or edits records within the RDM application. There are two kinds of validations:

 

 

The first kind are called Instantaneous validations. These conditions, e.g., regular expressions or string size are checked automatically when you enter an attribute value. When the input value fails to meet these condition, an INVALID message appears next to the attribute field.

 

The second kind are called Online validations. These are more complex conditions, which are triggered by clicking Validate in the Create detail/Edit detail dialogue or upon closing them. Such validations are performed by DQC plans (using, e.g., phone number or address lookups) or SQL queries in RDM. When the input value fails to meet these condition, a Warning message appears next to the attribute field.

Records which do not satisfy online conditions (or which are imported to RDM with invalid inputs) will have the INVALID value in the Validity default column and cannot be published.

Record validity conditions and validations are defined by the administrator in the RDM back-end and cannot be changed directly in the web application.

Hi  @DannyRyan. It’s great to see that these online validations are possible, but do you then also have some technical info on how to set them up. We would for example like to set up a business rule in RDM to check summary counts and forbid new entries that would create errors in this validation.

What is the correct syntax? Where can we find help or docs?

 

Location Code         Main Location Code         Location Name                 Unique City Code               Validation Result

BE-BRU                       BE-BRU                       Brussels East HQ                      BR                               OK

BE-BRU2                     BE-BRU                       Brussels West HQ                     BR                                 OK

BE-GEN                       BE-GEN                       Gent North HQ                          GE                                 ERROR

BE-GEN2                     BE-GEN                       Gent Zuid HQ                            GE                                 ERROR

> BE-GNK                       BE-GNK                       Genk HQ                                   GE                               ERROR 

ERROR reason: Unique City Code GE is used in Country BE for 2 different Main City Codes GEN and GNK. Which is not allowed by business rule. (and which needs to be implemented here) 


Hi Joeri,

Have a look at SQL Validation in our online docs
https://support.ataccama.com/home/docs/aip/latest/development-guides/rdm-development-guide/rdm-configuration/creating-the-rdm-data-model/rdm-tables#:~:text=validation%20is%20violated.-,SQL%20Validations,-This%20section%20allows
 

In the docs, there is some example SQL that works with our built in RDM Example Model project. (Which you can boot locally in ONE Desktop), to see it functioning).

The business rule is: There should be only 1 branch manager per city.
The technical implementation of this business rule is: 
select d.generatedPk, 'code' as name

from $BRANCH$ d

where d.CITY in (

    select distinct(CITY)

    from $BRANCH$ c

    GROUP BY CITY

    having count(distinct(BRANCH_MANAGER))>1

)


I hope this help, please keep us updated on how you get on.
Have a great day.
Danny
 


Great reply Danny, thanks, i’ll look into it further tomorrow. This will definitely help!


Reply