Description |
Mapping Execution Order (Magic xpi 3.x)
When you use multiple Destinations in the Data Mapper, you need to take the execution order into consideration:
-
The Data Mapper's execution order depends on the number of Source items, the order and type of the Destination items, and the mapping between them.
-
For each mapped compound record in a specific Source, all mapped Destination items from the same type (flat/hierarchy) are executed from top to bottom, according to the location in the Destination’s hierarchy.
-
If more than one Source is mapped to the same Destination (this is an option only if the Destination is a hierarchy type), the execution order is recursive (inner executions are done first).
-
Per single Source:
-
The execution order is from top to bottom, where:
-
All flat types are treated as a group. Their execution order is according to their order of appearance in the Data Mapper’s Destination. They are executed one after the other, from the first flat Destination until the last one.
-
Each XML Destination is treated as a stand-alone Destination. There is no grouping as there is in the case of flat types.
-
For example:
-
A Destination includes Destinations in the following order: XML_1, FlatFile_1, XML_2 The execution order is: XML_1, FlatFile_1, XML_2
-
A Destination includes Destinations in the following order: FlatFile_1, XML_1, FlatFile_2, XML_2, FlatFile_3 The execution order is: FlatFile_1, FlatFile_2, FlatFile_3, XML_1, XML_2
-
Flat types are Flat File, Variable, ODS, Call Flow, UDS, and Database.
-
Hierarchy types are XML, template, and IFC Model.
-
The Database data type is a flat type, but the transaction is committed at its end. This means that the data is written to the database according to its location in the hierarchy at the Destination, but the defined transaction is committed upon completion. If the transaction is a record level, it is committed immediately after the data has been written to the database.
-
The total number of executions is equal to the number of actual records in the Source during runtime, according to the mapped compound.
-
In a Database Destination:
-
When Insert is defined as the DB Operation, regardless of the selected DB Transaction Level and Error behavior, the execution order is according to the mentioned in numbers 1 to 8 (above).
-
When Update, Delete, or Dynamic is defined as the DB Operation, the execution order is according to the order of the Destinations. If the Data Mapper’s Error behavior is defined as Exit, and an error occurs, the execution is terminated at the point of error.
-
If you reorder the Destinations, the execution order may also change. This can affect the execution results.
|
|
---|