Versions Compared

Key

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

...

  1. Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
  2. Map source and target elements as displayed in figure below (see Figure 543).

    Figure 543: Map Source and Target Elements

  3.   Click the parent node (e.g. Record) of the target element and apply the For Each for parent node (e.g. Record) of schema Source1.
  4. Create a local variable at Record level of the target schema. Select EMPID element of Source1 schema as the value of the variable.
  5. Click target element (e.g. Address) on which you want to apply the key.
  6. Click the Node tab displayed in the Mapping Graph Area. All tabs of the Node tab are displayed.
  7. Click the Textual Rules tab. The Textual Rules pane is displayed in the Mapping Graph Area.
  8. Click the Aggregation mapping function and select the Key sub-function. The Key function is displayed in the Textual Rules pane (see Figure 544).

    Figure 544: Key Function

  9. Place the cursor, at the first argument of key function and double-click the required key that you want to apply, from Keys in the Parameters Panel. This is the first argument for the key function.
  10. Place the cursor at the second argument of key function and double click the required local variable, under Local/Ancestor Variables in the Parameters Panel. This is the second argument for the key function.
  11. The syntax of the key function in the textual rules pane will be displayed as:
    key ("key1" , $VarEmpidSource1)
  12. Append the name of the element (Address), of the source2 schema, which needs to be mapped to the target element (Address).

    Now the syntax of the mapping will be displayed as:

    key ("key1" , $ VarEmpidSource1)/Address  (see Figure 545)

    Figure 545: Map Key Function Node to Target Element

  13. Click the Apply Mapping (  ) button. This maps the key to the address element of the target schema. If you shift the focus to another target element, or click any of the Mapping Rules, Textual Rules, Properties, Node, XSL or Debugger tabs, without applying the mapping, then an alert message is displayed (refer to Figure 522).
  14. Click No to apply the mapping and shift focus to the other object. If you click Yes, then the mapping activity is cleared and is replaced by the previous mapping in the Mapping Graph Area and the focus is shifted to the other object.
  15. Apply For Each on element address of target schema from Root level of Source2 schema. This will execute key in the context of second source schema (i.e. Source2).
  16. Save the mapping activity and exit the Data Mapper.

    Info

    You can  view and validate the generated mapping XSL,  view the target XML, and view and validate mapping output, before saving the mapping activity.