Work with Sources with Multi-part Keys

Map allows a user to map multiple sources to one target, and to map multiple sources with multi-part keys to a target.

The sources are assigned to the target in Target Design.

ZLegacy<KeyFieldName> is the key for the target table. Map the keys on the source table to the ZLegacy<KeyFieldName> on the Field Mappings page.

If a source has more keys or a different number of keys than the target, add a mapping that uses a Rule action to concatenate key values on the source table into a single target key field beginning with ZLegacy.

To map multiple sources to a target when each source has one key, the key can be mapped to the primary key in the target, and the source tables are brought into Map and mapped to a target using the same procedures as with a single source to single target mapping.  In this case, the primary keys from multiple sources are mapped to the same primary key in the target.

Map also allows a user to map a source (or multiple sources) that has multi-part keys to a target with one key.

A user can map a multi-part key from a source to a single key in a target using the Field Mappings page in Map or a view created from the source table.  

To map a multi-part key in a source to a single key in a target using the Field Mappings page:

  1. Assign the source to the target in Target Design.
  2. Click the Targets icon on the Process Area Launch page in Map.
  3. Click the Sources icon for a Target.
  4. Click the Mapping icon for the Target Source with the multi-part key.
  5. Enter zLegacy {Key Field Name} in the Search field and press Enter.
  6. Click Edit for the  zLegacy{Key Field Name].
  7. Select Rule from the Action list box.
  8. Enter the concatenated names of the multi-part key in the Rule SQL field, with a + sign between each part of the field. For example, enter ProductID+Plant.
  9. Click Save.
  10. Click the Submit icon in the Page toolbar.