Developer Mapping Guide > Mappings > How to Develop a Mapping
  

How to Develop a Mapping

Develop a mapping to read, transform, and write data according to your business needs.
To develop and run a mapping, perform the following tasks:
  1. 1. Determine the type of mapping that you want to create.
  2. 2. Create input, output, and reusable objects such as the reusable transformations and mapplets that you want to use in the mapping.
  3. You can use physical data objects, logical data objects, or virtual tables for mapping input and output.
  4. 3. Create the mapping.
  5. 4. Add objects to the mapping. You must add input and output objects to the mapping. Optionally, add transformations and mapplets.
  6. 5. Link ports between mapping objects to create a flow of data from sources to targets, through mapplets and transformations that add, remove, or modify data along this flow.
  7. 6. Validate the mapping to identify errors.
  8. 7. Save the mapping to the Model repository.
  9. 8. Run the mapping to see the mapping output.

Creating a Mapping

Create a mapping to move data between sources and targets and transform the data.
    1. Select a project or folder in the Object Explorer view.
    2. Click File > New > Mapping.
    3. Enter a mapping name.
    4. Click Finish.
    An empty mapping appears in the editor.

Adding Objects to a Mapping

Add objects to a mapping to determine the data flow between sources and targets.

Connecting Mapping Objects

Complete a mapping by connecting the mapping objects. You connect mapping objects through the ports. Data passes into and out of a transformation through input ports, output ports, and input/output ports.
When you add an object to a mapping, you connect the properties according to how you want the Data Integration Service to transform the data. The editor displays mapping objects in the following ways:
When you link ports between input objects, transformations, mapplets, and output objects, you can create the following types of links:
You can manually link ports or link ports automatically:
For more information about linking ports, see the Developer Transformation Guide.

Creating Target Load Order Constraints

Target load order constraints restrict the order that the Data Integration Service loads rows to target tables in the same mapping. Create target load order constraints on the Load Order tab of a mapping.
    1. Click inside the editor.
    The mapping Properties tabs appear in the bottom window.
    2. Click the Load Order tab.
    The following image shows the Load Order tab:
    This image shows the Load Order tab with three primary and secondary constraints.
    The image shows three constraints. Each constraint contains the primary target and the secondary target. The constraints specify that the Data Integration Service must load the Customer_Master target before the Customer_Orders target. The Sales_Rep_Master must load before the Customer_Orders target. The Sales_Office_Master must load before the Sales_Rep_Master.
    3. To enter a constraint, click the New button.
    The Developer tool creates a row for the constraint.
    4. Click the Primary field.
    A list of the target instances in the mapping appears.
    5. Select the target instance that you want to load first.
    6. In the Secondary field, select the target instance to load second.
    You can enter the constraints in any order. You could enter the following pairs of constraints to indicate the same restrictions as in the previous image:
    Primary
    Secondary
    Sales_Office_Master
    Sales_Rep_Master
    Sales_Rep_Master
    Customer_Master
    Customer_Master
    Customer_Orders
    7. Enter as many constraints as you need.

Validating a Mapping

Validate a mapping to ensure that the Data Integration Service can read and process the entire mapping.
    1. Right-click the mapping and select Validate.
    Errors appear in the Validation Log view.
    2. Fix errors and validate the mapping again.

Running a Mapping

Run a mapping to move output from sources to targets and transform data.
If the domain includes more than one Data Integration Service and you have not selected a default service, the Developer tool prompts you to select one when you preview data or run a mapping.
    bulletRight-click the mapping in the editor or the Object Explorer view and click Run Mapping.
    The Data Integration Service runs the mapping and writes the output to the target.
    When the Data Integration Service is configured to use operating system profiles, it runs the mapping with the operating system profile.