Components > Mapplets > PowerCenter mapplets
  

PowerCenter mapplets

If you are an Informatica PowerCenter user, you can use a PowerCenter mapplet to create a mapplet in Data Integration.
To use a PowerCenter mapplet, you create a mapplet in PowerCenter and export the mapplet to an XML file. Then you upload the XML file in to Data Integration.
A mapplet contains a set of transformations. A PowerCenter mapplet can contain one or more Source transformations but it cannot contain a Target transformation. You can use PowerCenter mapplets in the following Data Integration tasks:

Active and passive PowerCenter mapplets

Mapplets are either active or passive.
When you upload a PowerCenter mapplet in Data Integration, you specify whether the mapplet is active or passive.
An active mapplet includes at least one active PowerCenter transformation. An active mapplet can return a number of rows different from the number of source rows passed to the mapplet. For example, an active mapplet might aggregate five source rows and return one row.
A passive mapplet includes only passive PowerCenter transformations. A passive mapplet returns the same number of rows that are passed from the source.

Stored Procedures in mapplets

When a PowerCenter mapplet that you want to use contains a Stored Procedure transformation, the stored procedure must include exception handling.
Exception handling can be as complex as necessary. Or, you can use the following simple example:
Exception
when NO_DATA_FOUND
then NULL;
END;
For example, you have the following stored procedure in a PowerCenter workflow:
CREATE OR REPLACE PROCEDURE SP_GETSAL_WITH_EXCEPTION (EMP_ID NUMBER, EMP_NAME OUT VARCHAR, SAL OUT NUMBER)
  AS
  BEGIN
  SELECT EMPNAME INTO EMP_NAME FROM EMPLOYEE WHERE EMPID=EMP_ID;
SELECT SALARY INTO SAL FROM EMPLOYEE WHERE EMPID=EMP_ID;
Before you export the workflow, add exception handling as follows:
CREATE OR REPLACE PROCEDURE SP_GETSAL_WITH_EXCEPTION (EMP_ID NUMBER, EMP_NAME OUT VARCHAR, SAL OUT NUMBER)
  AS
  BEGIN
  SELECT EMPNAME INTO EMP_NAME FROM EMPLOYEE WHERE EMPID=EMP_ID;
SELECT SALARY INTO SAL FROM EMPLOYEE WHERE EMPID=EMP_ID;
Exception
when NO_DATA_FOUND
then NULL;
END;

PowerCenter XML files for mapplets

To use a mapplet in Data Integration, you upload a PowerCenter XML file that defines a PowerCenter mapplet.
Consider the following rules when you use a PowerCenter XML file to create a Data Integration mapplet:

PowerCenter mapplets in Data Integration tasks

Use the following rules and guidelines for using PowerCenter mapplets in Data Integration tasks:

Configuring a PowerCenter mapplet

To create a mapplet in Data Integration, you upload a PowerCenter XML file that contains a PowerCenter mapplet.
When you upload the PowerCenter XML file, Data Integration creates a mapplet based on the mapplet definition in the XML file.
    1To create a mapplet, click New > Mapplets > Mapplet - PC Import and then click Create.
    To edit a mapplet, on the Explore page, navigate to the mapplet. In the row that contains the mapplet, click Actions and select Edit.
    2Configure the following details:
    Detail
    Description
    Mapplet Name
    Name of the mapplet.
    Mapplet names can contain alphanumeric characters, spaces, and the following special characters: _ . + -
    Maximum length is 100 characters. Mapplet names are not case sensitive.
    Location
    Project folder in which the mapplet is to reside.
    Description
    Description of the mapplet.
    Maximum length is 255 characters.
    Mapplet Type
    Whether the mapplet is active or passive. The mapplet type depends on the type of PowerCenter transformations in the mapplet:
    • - Active. The mapplet includes one or more active PowerCenter transformations.
    • - Passive. The mapplet includes only passive PowerCenter transformations.
    3To upload the PowerCenter XML file, click Upload.
    4In the Upload Mapplet XML File dialog box, click Choose File.
    5Browse to the appropriate location and select the PowerCenter XML file.
    6Click OK.
    The Mapplet XML File Details area shows the connections, input fields, and output fields.
    7Click Save.