Creating a mapping with multiple sources
Model integration logic using mappings with multiple sources
Now that we have created basic mappings and extended them with expressions it is time to see how we can add multiple sources to a mapping.
To demonstrate this, we'll extend the ExampleDWH model with a new Product entity that is sourced from MySimpleSalesSystem and OpenPIM.
Create a new entity
Open the ExampleDWH model and create a new entity Product. Make sure to add the attributes as depicted in the picture below:
Create a multi-sourced mapping
This time we'll create the mapping by right clicking on the Product in the explorer and select "Derive mapping...". Provide a suitable name and hit OK. In the mapping canvas, drag the Product entity from MySimpleSalesSystem to the canvas and create attribute mappings for the product id and the product name:
Now, drag the entity Item from the OpenPIM system to the canvas as a second source. Create attribute mappings from Type Identifier to ProductType and Parent Identifier to ProductGroup.
Set the source object dependencies
In a mapping that uses more than one source, we need to define how the sources should be related to each other in the context of the mapping. We can define this using the properties panel on the itemSourceObject. First we add ProductSourceObject as a dependency. Then we define the related attributes under conditions:
Now we have created a complete, multi-sourced mapping.



