Overview Logical Validation Model¶
In this section we explain what a logical validation model is and why you need it. You will also find an overview of how to create a logical validation model.
What is a logical validation model?¶
A logical validation model is in line with what the business wants in terms of language, structure, identification and quality. It specifies the required transformations on the source data to adhere to the business requirements, adds timestamps (transaction time) to the data, and adds constraints and business rules to validate the data.
You create a logical validation model for each technical staging model in the technical layer. This way, all data received from the technical layer will be validated and transformed to be in compliance with the business requirements. The logical validation model differs from the technical staging model in four ways:
- Language: the source system (tenant) can deliver entities and attributes with technical names such as
BUT000for an entity that represents a concept named asCustomers. In general, these technical terms are meaningless and the business doesn't use them when they talk about their product. In the logical validation model, entities and attributes names should reflect the business terms.
Info
It is important to talk with the stakeholders and domain experts, i.e. the business, to identify the terms and names that should be used to describe the data.
-
Identifying key: each entity in a logical validation model must have an identifier, while in a technical staging model this is not mandatory. A sales order for example is identified by its order number.
-
Normalization: in a technical staging model, concepts can be hidden in tables. This means that one single table in a technical model can hold information regarding more than one concept. In the TPCH-H technical staging model, for example, the attributes
CLERKandCLERKKEYare part of theOrderstable. In this case, the tableOrdersholds information about orders but also about clerks.
In the logical validation model, to reflect the reality of the business, it might be necessary to split tables and to create new tables. Suppose, for example, that you want to identifyClerkas an employee, who can exist separate fromOrders. To reflect this decision, you include a new entity, calledClerk, in the logical validation model. -
Constraints: a technical staging model can be a weak typed model, without foreign keys and other relationships between entities. In the logical validation model, you should add constraints to validate the quality of the data according to the business requirements.
Info
Constraint validation is one of the key features of i-refactory, which allows you to ensure that data delivered can be trusted. The results of the constraint validation phase are recorded and can be used in the communication with the delivering tenant or for statistical purposes.
How to create a logical validation model?¶
There are two common ways to create a logical validation model:
-
Generate from a logical data model (LDM): when a logical data model is available, you can generate the logical validation data model from the LDM. This speeds up your work and ensures you use the exact definitions as specified in the LDM. Another advantage is having lineage on all physical data models. For example, if you alter an attribute in one model, you can evaluate the impact of this change in the other model.
-
Create manually: when there is no LDM available, you need to manually create the logical validation model based on the business requirements. For this, you need to understand the business data request (the Need) and you also need to perform a source data analysis (the Supply).
Info
During the creation of the logical validation model, you can make implementation choices different from the ones made for the LDM. This means, for example, that the LDM can be more explicit in specifying concepts, such as defining subtypes with only inherited attributes. In the logical validation model, the subtype could be implemented as an attribute in an entity.
What's next?¶
After you've created and checked the logical validation model:
- You need to set or upgrade the model version.
- You can create a central facts model.