The Auto Mapper feature can be used only when the elements of source and target schema are at the same hierarchy level and have the same names. However, if you want to automatically map the elements when the names of the elements of source and target schemas are different, you cannot use this feature. For example, if the source schema has elements, EmpFirstName and EmpLastName and the target schema has the elements, firstName and lastName then you cannot define mapping between these two schemas using the Auto Mapper feature.
To define a mapping between the schemas when the elements of source and target schema are at the different hierarchy level (which may include elements at the different parent and child level) and have the different names, you can use the Custom Auto Map feature. This feature enables you to define the mapping between such schemas where elements to be mapped are stored in different parent and child level and in addition elements name are different.
Scope of a Custom Auto Map
You can also select the scope of a Custom Auto Map at the time of defining and saving it. Scope of a Custom Auto Map is the context within which it is defined and is accessible within or across the user groups. A Custom Auto Map can be defined in any of the following scope:
- Global: The Custom Auto Maps defined within Global scope are available within all the mapping activities. Once you create a global Custom Auto Map in a mapping activity, you can use it in all the mapping activities.
- Group: The Custom Auto Maps defined within Group scope are available only within the specific user group.
By default, a Custom Auto Map is saved in the Global scope and in the Parameter Panel; it is added and displayed under the folder Custom Auto Map/Global. If you select to save the Custom Auto Map in the Group scope then in the Parameters Panel, it is added and displayed under the folder Custom Auto Map/Group. You can also change the scope of a Custom Auto Map from Group to Global directly from the Parameters Panel by right-clicking the Custom Auto Map and selecting the Move to Global option. However, you cannot change the scope of a Custom Auto Map from Global to Group.
The high-level steps to use Custom Auto Maps are:
- Defining a Custom Auto Map
- Activating a Custom Auto Map
- Using a Custom Auto Map in Mapping
In addition, you can also manage a Custom Auto Map from the Parameters Panel.
Defining a Custom Auto Map
You can define a Custom Auto Map by both manually providing the names of the source and target elements to be mapped in the Custom Auto Map Dialog screen or by defining the names of source and target elements to be mapped in a CSV file and then loading the CSV file in the Custom Auto Map Dialogscreen. Loading a CSV file is useful when you have a large set of source and target elements to be mapped.
Defining a Custom Auto Map Using a CSV File
Steps to Manually Define a Custom Auto Map
Ensure that the source and target schemas are loaded in the Data Mapper and all their elements are listed under their respective nodes.
Source and Target Schemas with different Element Names
Click the Custom Auto Map
button on the tool bar or select Custom Auto Map from the Actions menu. The Custom Auto Map Dialog screen is displayed.Custom Auto Map Dialog screen
- Enter the name of Custom Auto Map in the Name textbox.
Select the scope of the Custom Auto Map. By default, the radio button Global is selected and a Custom Auto Map is saved in the Global scope.
If you want to save the Custom Auto Map within the current user group, select the Group radio button. This will save the Custom Auto Map as the group Custom Auto Map and can be used in any mapping activity within the current user group. In the Parameters panel, the Custom Auto Map will be displayed under the folder hierarchy Custom Auto Map/Group.
- Click the Add button to add a new row for Source Element and Target Element columns. You can also add a row by pressing the Enter key. This will add the row immediately next to the row which is currently selected.
- Enter the name of the source element for which you want to define Custom Auto Map in the Source Element column.
Enter the name of the target element to which you want to map the source element specified in previous step, in the Target Element column.
Custom Auto Map DialogIf you need to delete any row, select the respective row and click the Delete
button.- Click the Save & Close button to save the Custom Auto Map. This will add the Custom Auto Map in Custom Auto Map hierarchy in theParameter Panel. Similarly you can add more Custom Auto Map.
Parameters Panel
If you need to close the Custom Auto Map without saving it, click the Close
button.Defining a Custom Auto Map Using a CSV File
The Custom Auto Map feature also enables you to load a Comma Separated Values (CSV) file. You can use the set of values from the csv file which are separated by comma as a Map set for your process flow. For example, if you want to map the following source and target elements:
Source Element | Target Element |
EmpFirstName | firstName |
EmpLastName | lastName |
EmpMiddleInitial | middleNames |
Then, you can define the set of values in a csv file as:
- EmpFirstName,firstName
- EmpLastName, lastName
- EmpMiddleInitial, middleNames
Steps to Define a Custom Auto Map Using a CSV File
- In the Custom Auto Map Dialog screen, enter the name of Custom Auto Map in the Name textbox.
Click the CSV
button to load a csv file if you want to map the values using the values defined in the csv file. The server will consider the comma separated pair of values as the source and target elements to be mapped.Custom Auto Map Dialog: Load CSV
An Open window is displayed.
- Browse and select the respective csv file.
- Click Open to upload the csv file. This will populate the source and target elements columns with the values defined in the CSV file. .
Select the scope of the Custom Auto Map (see Figure 404).
Custom Auto Map Dialog
- Click the Save & Close button to save the Custom Auto Map. This will add the Custom Auto Map value map in Custom Auto Map hierarchy in the Parameter Panel.
Parameters Panel
Similarly you can add more Custom Auto Maps.
Activating a Custom Auto Map
When you define a Custom Auto Map, by default it is in deactivated state. To use a Custom Auto Map, you need to first activate it. Once you have activated the Custom Auto Map, you can use it in your mapping. Note that only activated Custom Auto Maps can be used in a mapping.
Steps to Activate a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map which you want to activate to use in a mapping.
Right-click the Custom Auto Map and select the option Activate.
Parameters Panel: Custom Auto Map Activate option
- The status of the Custom Auto Map changes to Active.
Parameters Panel: Custom Auto Map Status
You can now use this Custom Auto Map in your mapping. Similarly, right-click the Custom Auto Map and select the option Deactivate to deactivate a Custom Auto Map.
Using a Custom Auto Map
After activating a Custom Auto Map, you can use it in your mapping. Note that only one Custom Auto Map can be activated in the current mapping.
Steps to Use the Custom Auto Map in a Mapping
- Load the respective source and target schema.
- Create and activate the Custom Auto Map.
- Map the parent record of the Source schema to the parent record of the Target schema.
Right-click the parent record of the target schema and select Connect Matching Record options.
Select Connect Matching Children
The Connect Matching Children Dialog window is displayed.
Connect Matching Children Options
- Select the mapping criteria from the Automap options list. Its options are listed as:
- Ignore Case: The source and the target elements are mapped even if they are of different case. Their attributes are not mapped.
- Ignore Namespace: The source and target elements are mapped, when their names are same but source schema has any namespace prefix.
- Recursive: Elements of parent level as well as all child level with the corresponding target elements.
- Mix Attributes: Attributes of source and target schemas are mapped.
- Select the mapping criteria from the Existing Options list. These options are :
- Retain: If any source and target elements are already mapped, those mapping will not be overwritten.
- Overwrite: Overwrites all the existing mappings.
Click OK. This will map source and target schema as per the criteria selected.
Source and Target elements are mapped
Managing a Custom Auto Map from Parameters Panel
You can also manage the Custom Auto Map from the Parameters Panel. When you right-click the Custom Auto Map in the Parameters Panel, you can perform the following operations on a Custom Auto Map:
- Edit a Custom Auto Map
- Move a Custom Auto Map from Group to Global
- Delete a Custom Auto Map
Editing a Custom Auto Map
In edit mode, you can edit the name of the Custom Auto Map and the source and target elements to be mapped. Note that you cannot edit the scope of a Custom Auto Map in edit mode. The radio buttons to select the scope becomes non-editable once you save the Custom Auto Map. However, you cannot edit the Custom Auto Map when it has been already been used in the mapping and that mapping has been saved.
Steps to Edit a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map to be edited.
Right-click the Custom Auto Map and select the option Edit.
Parameters Panel: Custom Auto Map Edit option
The Custom Auto Map is open in Edit mode.
Custom Auto Map Dialog screen in Edit mode
- Click the Save & Close button to save the Custom Auto Map.
Moving a Custom Auto Map from Group to Global
You can also change the scope of a Custom Auto Map from the Parameters Panel by moving the Custom Auto Map from Group to Global. However, you cannot move a Custom Auto Map if it is in the activated state and has been used in mapping. In addition, you cannot move a Custom Auto Map from Global toGroup.
Steps to Move a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map which you want to move from group to global.
Right-click the Custom Auto Map and select the option Move To Global.
Parameters Panel: Move to Global option
A warning message is displayed.
Warning Message- Click Yes to confirm moving the Custom Auto Map from Group to Global.
Change Scope in Parameters Panel
This will change the scope of the selected Custom Auto Map and now the Custom Auto Map will be displayed under the Global folder.
Deleting a Custom Auto Map
Steps to Delete a Custom Auto Map
- In the Properties Panel, select the Custom Auto Map which you want to delete.
Right-click the Custom Auto Map and select the option Remove.
Parameters Panel: Custom Auto Map Remove option
A warning message is displayed.
Parameters Panel: Custom Auto Map Status
- Click Yes to confirm the deletion of selected Custom Auto Map. The selected Custom Auto Map will be deleted.