The mappings are represented in the editor by lines that are drawn between the source and target nodes. Each mapping line contains a hub in the middle of the line. The color of the line depends on the type of mapping. Discovered mapping lines contain hubs that appear as brackets. All other mapping lines contain square hubs.
You can select a mapping line by clicking the mouse button anywhere on the line or the hub of the line. The color of the selected mapping line appears darker than the lines that are not selected, unless you have changed the defaults in the Mapping Editor preferences that are defined on the Workbench preference page. You can select multiple lines by pressing the control key (CTRL) when you select mapping lines. Each mapping line that you select while pressing the CTRL key becomes part of the mapping selection. You can apply the options from the context menu to the mapping line or lines that you select. The appearance of the mapping line hub changes depending on the existence of refinements, such as transformations or expressions, that you add to the mapping group.
A mapping connects one or more source columns or attributes to a single target column, attribute, or an XML schema document (XSD) simple element or attribute. When you generate scripts from a mapping model, the source information from each mapping is transformed if you specify to transform mappings, and the result is viewed in terms of the mapping target. You can create mappings manually by right-clicking on the source and target elements, then clicking Create Mapping. You can create mappings automatically by running the discover function and then accepting the discovered mappings. You can delete the mappings by right-clicking the mapping line and selecting Remove Mapping.
A mapping group contains mapped elements by target relational database table, target logical data model entity, or XML schema element. One query is generated for each mapping group. When you create a mapping, the mapping editor attempts to include that mapping in an existing mapping group. If there is no appropriate mapping group, the mapping editor creates a new mapping group.
A constant mapping contains a target element but no source element. You can select a transformation function such as a date or time function to assign a value to the target element. You create constant mappings by right-clicking a target element in the Mapping Group Details view and selecting Create Constant Mapping.
A discovered mapping is a mapping that is proposed when you run the discover function. Discovered mappings are visible in the mapping editor and they are saved in the mapping model. They are ignored when you generate scripts from the mapping model.
You can accept a discovered mapping by right-clicking on the discovered mapping line and selecting Accept Mapping. You can delete a discovered mapping by right-clicking on the discovered mapping line and selecting Reject Mapping. You can select multiple discovered mapping lines to accept or reject more than one discovered mapping at one time. You can also accept or reject all of the discovered mappings by right-clicking in the mapping editor and selecting either Accept All Mappings or Reject All Mappings.
An invalid mapping results
from name changes in the source or target models that are used in
the mapping model. When you open a mapping editor with an existing
mapping model, the mapping model is re-validated as the mapping editor
opens. If the source or target information in the mapping model is
no longer valid, the related mappings are no longer valid. Mapping
lines that connect mappings that are not valid appear as red lines
by default. The hubs on the mappings that are not valid appear with
error icons: (). The
outline view shows the paths of the source and the target elements
of the mapping that is not valid when the mapping model was last saved.
You can repair a mapping that is no longer valid by right-clicking
the mapping and the renamed source or target element and selecting Add
to mapping.