Loading data when source and target are hierarchical Files
During the integration process, Semarchy xDI creates and uses temporary tables to load and integrate the data into the target. But, when using files as source and target, these tables cannot be created, as no databases are used.
This article demonstrates a solution to create a mapping to load data when the source and target are both hierarchical files.
The structure of our files looks like this :
We are using here computed fields to simulate a Primary/Foreign key between the record and sub-records.
The use of staging
You can make multi-target mappings, and create stages. The creation of stages is a powerfull fonctionnality which permits to have a temporary place in a mapping (in which we can make operations on data before insertion, like unions, minus, …).
We are going to use this to accomplish our goal.
Note that even if stages are only available since the S18 Designer, older runtimes can understand and execute the processes generated in S18. It is so possible to use the comfort of S18 without having to upgrade the runtimes.
To use a stage, drag and drop a database schema in which you want the temporary tables used by the stage to be created.
In a mapping all source records have to be instanciated. It is not actually possible to map fields of the sub-records, like the MAIL one, directly from the CUSTOMER main record. The sub-records have to be put on the mapping and joined. We used here the computed fields to make the join. |
Now, we can drag and drop on the stage the fields from the sources we want to use, and then map them to the target :
The Record Keys on the target have to be mapped. |