Working with Mappings - Informatica

You can complete the following tasks with mappings:

  • Create a mapping. When you create a mapping, you save the mapping name in the repository. You can then develop and save the mapping.
  • Open a mapping. You can open one mapping at a time in a folder.
  • Copy a mapping. You can copy a mapping within the same folder or to another folder.
  • Copy a mapping segment. You can copy segments of mappings and mapplets when you want to reuse a portion of the mapping logic.
  • Copy objects in a mapping. You can copy one or more objects in a mapping and paste them into another mapping or mapplet in the same folder.
  • Export a mapping. You can export a mapping to an XML file.
  • Import a mapping. You can import a mapping from an XML file that you exported in the Designer.
  • Edit a mapping. You can add, modify, or delete objects in a mapping.
  • Save a mapping. When you save a mapping in the repository, the Designer performs mapping validation.
  • Debug a mapping. Run the Debugger in the Mapping Designer to test mapping logic.
  • Delete a mapping. Delete a mapping from the repository if you do not want to use it again.
  • View link paths to a port. You can view link paths to a port in a mapping. You can view the forward path, the backward path, or both.
  • View source column dependencies. You can view from which source columns a target column receives data.
  • Connect objects in a mapping. You can connect objects in a mapping to define the flow of data from sources to targets.
  • Link ports. You can connect mapping objects by linking ports manually or automatically by name or position.
  • Propagate port attributes. You can propagate port attributes in a mapping. You can propagate attributes forward, backward, or in both directions.

Creating a Mapping

The first step in the process of moving data between sources and targets is to create a mapping in the Mapping Designer.

To create a mapping:

  1. Open the Mapping Designer.
  2. Click Mappings > Create, or drag a repository object into the workspace.
  3. Enter a name for the new mapping and click OK.

The naming convention for mappings is m_MappingName, such as m_ResearchProjects.

Opening a Mapping

To open a mapping, drag it from the Navigator into the Mapping Designer workspace. If you have a mapping in the same folder already open, the Designer prompts you to close it before continuing. Click OK to close the current mapping and open the other one.

You can open one mapping at a time in a folder. If you open more than one folder at a time, you can open a mapping in each folder.

Tip:To open a mapping, you can also right-click a mapping in the Navigator and choose Open.

Copying a Mapping

You can copy mappings with the Designer:

  • Within a folder
  • To a folder in the same repository
  • To another repository

The Designer provides a Copy Wizard that lets you copy objects in the repository. When you copy a mapping, the Copy Wizard creates a copy of each component in the mapping, if the component does not already exist. If any of the mapping components already exist, the
Copy Wizard prompts you to rename, replace, or reuse those components. However, if the object is a shortcut, or if the destination folder already contains a shortcut with the same name, you cannot replace the object. You can only rename or reuse the object. If a mapping contains sources with primary key-foreign key relationships to sources not used in the mapping, the Copy Wizard prompts you to copy the related source.

Copying Mapping Segments

You can copy segments of mappings and mapplets when you want to reuse a portion of the mapping logic. A segment consists of one or more objects in a mapping or mapplet. A segment can include a source, target, transformation, mapplet, or shortcut. To copy mapping segments, select and copy the segments from the mapping designer and paste them into a target mapping or an empty mapping or mapplet workspace. You can copy segments across folders or repositories.

To copy a segment of a mapping or mapplet:

  1. Open a mapping or mapplet.
  2. Select a segment by highlighting each object you want to copy.
  3. You can select multiple objects. You can also select segments by dragging the pointer in a rectangle around objects in the workspace.

  4. Click Edit > Copy or press Ctrl+C to copy the segment to the clipboard.
  5. Open a target mapping or mapplet. You can also paste the segment into an empty workspace.
  6. Click Edit > Paste or press Ctrl+V.

The Designer prompts you to rename, reuse, or replace objects with conflicts.

Using the Copy As Command

If you make changes to a mapping, but you do not want to overwrite the original mapping, you can make a copy of the changed mapping by clicking Mappings > Copy As. When you use Copy As, the copy of the mapping contains the changes and the original mapping does not reflect these changes.

You can only use Copy As within the same folder. When you use Copy As, the mapping must be open in the workspace.

To use the Copy As command to copy a mapping:

  1. Open a mapping in the Mapping Designer workspace.
  2. Click Mappings > Copy As.
  3. Enter the new mapping name.
  4. Click OK.
  5. You cannot use Copy As to copy shortcuts.

Copying Mapping Objects

The Designer lets you copy one or more objects in a mapping. You can paste the objects you copy into any other mapping or mapplet in the same folder. You might want to copy objects from a mapping and paste them into another mapping or mapplet to reuse transformation logic you created.

Exporting and Importing a Mapping

You export a mapping to an XML file and import a mapping from an XML file through the Designer. You might want to use the export and import feature to copy a mapping to the same repository, a connected repository, or a repository to which you cannot connect.

Editing a Mapping

After you create a mapping, you can edit it by adding, modifying, or deleting objects. Objects include source definitions, target definitions, mapplets, and transformations. Before the Designer deletes objects in the mapping, it displays the list of objects to delete. The Designer displays a validation message in the Output window when you save a mapping.

To see what sessions or shortcuts may be affected by changes you make to a mapping, select the mapping in the Navigator, right-click, and select View Dependencies. Or, click Mappings > View Dependencies.

Reverting to a Previously Saved Mapping

While editing a mapping, you can revert to a previously-saved mapping, undoing changes you have entered since the last save. To do this, click Edit > Revert to Saved. When you click Yes, the Designer removes all changes entered since the last time you saved the mapping.

Renaming and Adding Comments to a Mapping

You can rename, add comments, or specify links to business documentation for a mapping at any time. Adding comments or business documentation links is an easy way to document the purpose of a mapping. The Repository Manager and MX views include these comments to help you analyze the metadata.

To rename or add comments to a mapping:

  1. Open a mapping in the Mapping Designer and click Mappings > Edit.
  2. In the Edit Mapping dialog box, enter a new name for the mapping.
  3. Add a description of the mapping in the comments box.
  4. You can enter up to 2,000 characters.
  5. Click OK.

Invalidating Sessions

When you edit and save a mapping, some changes cause the session to be invalid even though the mapping remains valid. The Integration Service does not run invalid sessions. If you edit a mapping, the Designer invalidates sessions when you perform the following actions:

  • Add or remove sources or targets.
  • Remove mapplets or transformations.
  • Replace a source, target, mapplet, or transformation when importing or copying objects.
  • Add or remove Source Qualifiers or COBOL Normalizers, or change the list of associated sources for these transformations.
  • Add or remove a Joiner or Update Strategy transformation.
  • Add or remove transformations from a mapplet in the mapping.
  • Change the database type for a source or target.

Debugging a Mapping

You can debug a valid mapping to gain troubleshooting information about data and error conditions. To debug a mapping, you configure and run the Debugger from within the Mapping Designer. When you run the Debugger, it pauses at breakpoints and you can view and edit transformation output data.

Deleting a Mapping

You may delete mappings that you no longer use. When you delete a mapping, you do not delete any sources, targets, mapplets, or reusable transformations defined outside the mapping.

Note:If you enable version control, a deleted mapping remains checked out until you check
it in. To check in a deleted mapping, click Versioning > Find Checkouts. Select the deleted mapping and click Tools > Check In.

You can delete a mapping from the Navigator window, or you can delete the mapping currently displayed in the Mapping Designer workspace.

  • To delete a mapping from the Navigator window, select the mapping and press the Delete key, or click Edit > Delete.
  • To delete a mapping currently displayed in the Mapping Designer workspace, click Mappings > Delete.

Viewing Link Paths to a Port

When editing a mapping, you may want to view the forward and backward link paths to a particular port. Link paths allow you to see the flow of data from a column in a source, through ports in transformations, to a port in the target.

To view link paths, highlight a port and right-click it. Select the Select Link Path option. You can choose to view either the forward path, backward path, or both. The Designer displays all the connectors in the link path you select.

When displaying both link paths, the Designer traces the flow of data from one column in the source, in and out of each transformation, and into a single port in the target. For unconnected transformations, the Designer does not display a link path. For connected Lookup transformations, the Designer shows each output port dependent upon the input ports involved in the lookup condition. For Custom transformations, the Designer shows that an output port depends on all input ports by default. However, if you define port relationships in a Custom transformation, the Designer shows the dependent ports you define.

Note:You can configure the color the Designer uses to display connectors in a link path.
When configuring the format options, choose the Link Selection option.

Viewing Source Column Dependencies

When editing a mapping, you can view source column dependencies for a target column. Viewing source column dependencies lets you see from which source columns a target column receives data.

To view column dependencies, right-click a target column in a mapping and choose Show Field Dependencies. The Designer displays the Field Dependencies dialog box which lists all source columns connected to the target column.

When you define a port expression that performs a calculation using multiple source columns, and then connect that port to a target column, the Field Dependencies dialog box lists all source columns you use in the expression.

For example, you have the following mapping:

Viewing Source Column Dependencies

Define the following expression in the Q3_sales port in the Aggregator transformation:

LAST(sales, quarter = 3)

Right-click the Q3_sales target column and choose Show Dependencies.

The following figure shows the Field Dependencies dialog box that appears:

Viewing Source Column Dependencies

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd Protection Status

Informatica Topics