Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In the Studio a data mapping essentially consists of a collection of instance mappings. Structurally each instance mapping has a target entity and , a single source expression and optionally one or more additional context expressions. The source expression is used to determine which source instances must be mapped to instances of the target entity. When starting with an empty target profile, each source instance will result in the creation of one new instance of the target entity. Additionally it is also possible to define additional Additional context expressions , which can be are used to activate an additional source instance, for each source instance, when determining attribute and relation values for each target instance.

With these 3 concepts (target entity, source expression, additional context), and even combining them across multiple instance mappings, it is possible to solve a wide range of mapping scenarios. Which combination of instance mappings to use and how to combine them exactly can be a difficult task however. The To help with this the Model Mapper introduces mapping rules and mapping rule types, with each rule type solving one of 4 basic mapping scenarios: Direct, Join, Split, Full.

In the Model Mapper it will be possible to see view a data mapping as a collection of mapping rules, with each rule conforming to a specific rule type. For backwards compatibility, the Model Mapper will analyze existing instance mappings to determine their rule types and transform them into the corresponding mapping rules. What these Of which rule types arethese mapping rules will be, and how they these rule types are detected is explained for each rule type in the following sectionssection.

A notable difference between an instance mapping and a mapping rule, other than the specific type, is that a mapping rule may have multiple target entities. For each target entity there also is a separate value mapping and a separate matching strategy.

Rule Type Definitions

The basic mapping scenarios (Direct, Join, Split, Full) are defined by the number of source instances and target instances that are mapped together when executing a mapping rule.

...

  • consists of a single instance mapping
  • has no additional contexts defined
  • source expression/label is unique over across all instance mappings

Join

...

In the Studio this is modeled as a single instance mapping with additional contexts. Like the Direct mapping, the context expressions. These additional context expression essentially give us multiple sources to use in the mapping. The source expression/label is unique over all instance mappings, but additionally, in combination with the list of additional context expressions/labels is also unique over all instance mappings.

...

  • consists of multiple instance mappings
  • additional contexts defined for all instance mappings in the Full mapping rule
  • source expression/label and list of additional contexts/labels are identical for all instance mappings in the Full mapping rule

Transformation

...

to mapping rules

How the transformation from instance mapping to mapping rule is performed is described in the following steps:

  1. Group instance mappings with identical sources together
    1. Instance mappings have identical sources if the source expression, source label and all additional context expressions and labels are exactly the same
  2. For each group of instance mappings
    1. If there is a single source and a single instance mapping in the group, transform to Direct mapping
    2. If there are multiple sources and a single instance mapping in the group, transform to Join mapping
    3. If there is a single source and a multiple instance mappings in the group, transform to Split mapping
    4. If there are multiple sources and multiple instance mappings in the group, transform to Full mapping

With these definition we can summarize the transformation from instance mappings to mapping rules in the following tableThe following table defines how we determine to which rule type an instance mapping will be transformed from the Studio to the Model Mapper.


Without additional contextsWith additional contexts
Unique source/contextsDirectJoin
Duplicate Identical source/contextsSplitFull