As you are aware, source and targets are reusable components, that is, you work on sources in the Source Analyzer and targets in the Target Designer, respectively. Also, you must be aware that you cannot edit sources and targets in the Mapping Designer, and they can be edited in Source Analyzer and Target Designer, respectively.
Sources and targets are called reusable components because you can use the same source and target in multiple mappings. We can reuse the source or target across multiple mappings only if the metadata requirement of both the mappings is exactly the same. In this case, metadata means the number of columns, their data type, their data size, indexes, constraints, and so on. Even if there are small changes, you cannot reuse the components.
On the same lines, if we have the same logic to implement across multiple mappings, we can use the reusable transformations, which allow us to reuse the same transformation across mappings. You can only reuse the transformation if the metadata requirements in the mappings are exactly the same. Even if there is a small difference, the reusable transformations will not work as there can be mismatch in the processing.
There are two ways in which you can create reusable transformations:
To use Transformation Developer, perform the following steps:
The transformation will appear on the screen. Also, you will see the transformation added to your navigator under Transformations, as shown in the following screenshot:
Now, you can drag-and-drop the transformation in the mapping in the Mapping Designer in order to use it as a reusable component.
You will see that you cannot edit the reusable transformation in the Mapping Designer. To edit the reusable transformation, you need to use Transformation Developer.
In the earlier section, we saw how to use a new transformation as a reusable transformation. Consider that you already have a transformation that you wish to use in another mapping, but as it is nonreusable, you are not able to do so. To solve this issue, we have an option using which you can make an existing nonreusable transformation reusable. Perform the following steps to do this:
A warning message will pop up mentioning that the process is irreversible.
You can see that the transformation is now added under Transformation in the navigator, which indicates that the transformation can be reused; you can reuse this in other mappings too.
In the previous section, we saw how to make a transformation reusable. Going further, you might also like to reuse logic that was implemented using multiple transformations. The group of transformations that can be reused is called as mapplets.
Mapplets can be created in the Mapplet Designer in Informatica PowerCenter Designer. Mapplets allow you to reuse groups of transformations in multiple mappings. As is the case with reusable transformations, in order to use mapplets, the metadata requirements of the mappings should be exactly the same.
You can use the Mapplet Designer to create mapplets with new transformations or use existing transformations.
To create a new mapplet, perform the following steps:
MPLT_REUSABLE
.MPLT_INPUT
and MPLT_OUTPUT
, respectively.MPLT_OUTPUT
and drag-and-drop the columns from filter transformation back to MPLT_INPUT
, as shown in the following screenshot:If you wish to reuse the logic that was implemented using multiple transformations in an existing mapping, you can simply copy the existing transformations from the Mapping Designer and paste it in the Mapplet Designer. This is the easiest way to use the existing group of transformations.
As you might have noticed, mapplet serves two purposes—first, it allows you to reuse your existing transformation and second, it makes your mapping look simpler by replacing multiple components with a single component.