Repeating mappings occur where a structure or field occurs multiple times within a message, and is defined at the message definition stage.
Source | Target |
customer
|
customer
customername[1]
customername[2]
|
Sources and targets are mapped using tree nodes; a tree node represents a schema type (including message types), or a database table or column. Put another way, a tree node represents the container for the specific message type.
You can expand a repeating node to show the instances. An instance, or more fully, an instance element node, is a single occurrence of a repeating element. For example, if a field has 10 occurrences, each one of those could be considered as an instance element node. This is not equivalent to the runtime instance that is received in the real message, but is a placeholder in case this element instance occurs in the message. In this topic, instance refers to the development-time type of instance as opposed to the runtime instance.
Instances are produced at the same level as the repeatable node and are siblings of the repeatable node. They reflect the structure of the node, and provide mappable entities to identify exactly which instance the user wants to use for the mapping. Each new sibling is suffixed with the index number of the current instance.
The index is 1-based for ESQL rather than 0-based as in Java.
As an example, consider the following structure:
message1 |_ top |_ middle |_bottom
where middle and bottom are repeatable; middle repeats n1..m1 times and bottom repeats n2..m2 times.
Each expanded instance node can be used in a mapping just like any other non-repeatable element, because this node is not repeatable. However, it can contain children that are repeatable in the case of nested levels of repeats. You cannot meaningfully expand the top level of a nested structure, as in the message shown above, when the inner levels are not expanded, so the expansion automatically expands the children under it to have the minimum number of instances that those nested repeatable nodes require. In the example, this means that a minimum required expansion for middle results in n1 instance being created, but the children of middle are not a single set with only one bottom. The minimum occurs for this instance are used to determine the number of repeats.
The following example shows a full tree node partially expanded.
message1 |_ top |_ middle[] |_bottom[] |_ middle[1] |_bottom[] |_bottom[All] |_bottom[1]
In this example, an entry followed by [] is referred to as a repeatable node, one followed by [All] is referred to as an all node, and one followed by [1] is referred to as an instance element node.
Related concepts
Mapping conditions
Case mappings
Related tasks
Developing mappings
Configuring a mapping
Related reference
Mappings
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ar00970_ |