Professional Documents
Culture Documents
19 Reusability Worklet Maplet Startegies
19 Reusability Worklet Maplet Startegies
Worklets are objects that represent a set of workflow tasks that allow reusing a set of workflow logic in
several windows.
Use of Worklet: - You can bind many of the tasks in one place so that they can easily get identified and
also they can be of a specific purpose.
There are 2 types of worklets in Informatica:
1. Reusable worklet
2. Non reusable worklet
A work let which can be assigned to multiple work flow is known as reusable work
A reusable work let is created using work let designer tool
A work flow which contains a work let is known as parent work flow
A work flow is a main program where as work let is the subroutine with in the main program.
Creating a Worklet:
1. Open up Informatica PowerCenter Workflow Manager
2. Click on Worklet Designer then the Worklets menu, then Create.
3. A dialog box will open. Go ahead and name your worklet at this point.
4. Next, add and connect tasks to your worklet just as you would a normal workflow.
8. Save your work and now you are ready to start your worklet by starting the parent workflow
that contains the worklet.
Mapplet
The Mapplet in Informatica is a very useful feature of Informatica PowerCenter. Just as in many
programming languages, reuse is essential to building fast, efficient software. Mapplets provide these
advantages in the Informatica PowerCenter environment. Mapplets are reusable objects with
transformations and logic very similar to a traditional mapping. The key difference is reuse. When we
want mapping logic to be reusable across other mappings, we should place this logic within a mapplet.
Mapplets help simplify mappings in the following ways:
Include source definitions: Use multiple source definitions and source qualifiers to provide
source data for a mapping.
Accept data from sources in a mapping
Include multiple transformations: As many transformations as we need.
Pass data to multiple transformations: We can create a mapplet to feed data to multiple
transformations. Each Output transformation in a mapplet represents one output group in a
mapplet.
Contain unused ports: We do not have to connect all mapplet input and output ports in a
mapping.
Mapplet Input:
Mapplet input can originate from a source definition and/or from an Input transformation in the
mapplet. We can create multiple pipelines in a mapplet.
Mapplet Output:
The output of a mapplet is not connected to any target table.
We can mapplet in mapping by just dragging the mapplet from mapplet folder on left pane as
we drag source and target tables.
When we use the mapplet in a mapping, the mapplet object displays only the ports from the
Input and Output transformations. These are referred to as the mapplet input and mapplet
output ports.
Make sure to give correct connection information in session.
Considerations
If you use a Stored Procedure transformation, you must configure the Stored Procedure Type
to be Normal.
You cannot include PowerMart 3.5-style LOOKUP functions in a mapplet.
You cannot include the following objects in a mapplet:
o Normalizer transformations
o Cobol sources
o XML Source Qualifier transformations
o XML sources
o Target definitions
o Pre- and post- session stored procedures
o Other mapplets
Example1:
We will join EMP and DEPT table. Then calculate total salary. Give the output to mapplet out
transformation.
Steps:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
Making a mapping:
We will use mplt_example1, and then create a filter transformation to filter records whose Total Salary
is >= 1500.
1.
2.
3.
4.
5.
6. Drag all ports from mplt_example1 to filter and give filter condition.
7. Connect all ports from filter to target. We can add more transformations after filter if needed.
8. Validate mapping and Save it.
Reusable Transformation
In a data integration project there are many processes which may share common data transformation
requirements. Deployment of reusable transformation objects in these cases avoids duplication of
metadata, reduces the development time and provides centralized change control.
Once an object is defined as reusable, it can be called in any mapping or mapplet. If we change any
properties of the transformation it will be automatically reflected in all the mappings transformations.
Several types of transformations such as lookups, aggregators, expressions, routers, and sequences can
be defined as reusable objects.
Example:
Navigate
Create
to
any
the
Transformation
Transformation
here
developer
for
in
Informatica
example
an
powercenter
Expression
designer.
transformation
This
can
be
dragged
and
dropped
in
any
mapping
from
the
side
menu: