Exporting a Mapping to PowerCenter and Creating a Web Service 2009 Informatica
Abstract This article explains how to export a mapping from Informatica Developer, import it into PowerCenter, and create the associated Web Service mapping, session, and workflow. Supported Versions Informatica Developer 9.0 PowerCenter 9.0 PowerCenter 8.6.1 PowerCenter 8.6 Table of Contents Overview.... 2 Step 1: Set the Release Compatibility Level and Validate the Mapping.... 3 Setting the Compatibility Level.... 3 Validating the Mapping.... 3 Step 2: Export the Logical Data Object Read Mapping.... 3 Export Options.... 4 Exporting a Logical Data Object Read Mapping.... 5 Rules and Guidelines for Exporting to PowerCenter.... 5 Step 3: Import the Object into PowerCenter.... 6 Differences in Imported Objects.... 6 Importing Objects through the Import Wizard.... 6 Step 4: Create the Web Service Mapping.... 7 Creating the Mapping.... 7 Step 5: Create the Web Service Session and Workflow.... 8 Creating the Web Service Session and Workflow.... 8 Overview This article explains how to export a mapping from Informatica Developer 9.0 to PowerCenter and use it in a web service workflow. Create mappings in the Developer tool to define logical and virtual views of data, and to map logical models to data sources and targets. Export the mapping to PowerCenter to run it as a web service. For example, you use the Developer tool to create a logical data object model that provides a consolidated view of your customers. The data object model contains the "Customers" logical data object. A logical data object read mapping populates the Customers data object with data from disparate physical sources. The mapping also cleanses and consolidates the data. Your company call center needs access to the Customers data object through a web service. Call center employees need to retrieve customer data based on the customer ID. 2
To provide the call center employees with access to the customer data through a web service, perform the following tasks: 1. Set the PowerCenter release compatibility level and validate the mapping using the Developer tool. 2. Export the logical data object read mapping as a PowerCenter mapplet using the Developer tool. 3. Import the mapplet into PowerCenter. 4. Create the web service mapping using the PowerCenter Designer. 5. Create the web service session and workflow using the PowerCenter Workflow Manager. Step 1: Set the Release Compatibility Level and Validate the Mapping To verify that a mapping is compatible with a PowerCenter release, set the PowerCenter release compatibility level in the Developer tool. The PowerCenter release you select applies to all mappings, mapplets, and logical data object models you can view in Developer tool. For example, if you want to export a logical data object read mapping for use in PowerCenter 9.0, set the compatibility level to PowerCenter 9.0.0. Set the compatibility level to a PowerCenter release and validate the mapping before you export it. When you set the compatibility level, the Developer tool performs two validation checks when you validate the mapping. The Developer tool first verifies that the mapping is valid in Developer tool. If the mapping is valid, the Developer tool then verifies that the mapping is valid for export to the selected release of PowerCenter. You can view compatibility errors in the Validation Log view. Setting the Compatibility Level Set the compatibility level in the Developer tool. 1. Click Edit > Compatibility Level. 2. Select the compatibility level. The Developer tool places a dot next to the selected compatibility level in the menu. Validating the Mapping Validate the mapping in the Developer tool. 1. Open the mapping. 2. Click Edit > Validate. Errors appear in the Validation Log view. 3. If the Validation Log view lists errors, correct the errors and revalidate the mapping. Step 2: Export the Logical Data Object Read Mapping After you validate the mapping, you can export it. The Developer tool exports logical data object read mappings as PowerCenter mapplets. When you export a logical data object read mapping, the Developer tool retains the mapping sources, and it converts the targets to Output transformations in the PowerCenter mapplet. A PowerCenter user creates a web service mapping using the mapplet. You can export objects to a PowerCenter XML file or directly to a PowerCenter repository. If you export an object to an XML file, you must specify the export XML file name and location. A PowerCenter user imports the object using the Import Wizard. 3
If you export an object to a PowerCenter repository, you must specify the pmrep control file that defines how to import objects into PowerCenter. You must also specify the following information: Property Host name Port number User name Password Security domain Repository name Description PowerCenter domain gateway host name. PowerCenter domain gateway HTTP port number. Repository user name. Password for repository user name. LDAP security domain name, if one exists. Otherwise, "Native." PowerCenter repository name. Export Options When you export a mapping or logical data object read mapping, specify the export options. Property Project Target release Export selected objects to file Export selected objects to PowerCenter repository Send to repository folder Use control file Convert exported mappings to PowerCenter mapplets Convert target mapplets Export reference data Reference data location Data service Code page Description Project in the model repository from which to export objects. PowerCenter release number. Exports objects to a PowerCenter XML file. Exports objects to a PowerCenter repository. Exports objects to the specified folder in the PowerCenter repository. Exports objects to the PowerCenter repository using the specified pmrep control file. Converts Developer tool mappings to PowerCenter mapplets. The export process converts logical data object read mappings to PowerCenter mapplets, so you do not need to select this option. Converts targets in mapplets to Output transformations in the PowerCenter mapplet. You do not need to select this option. Exports the reference table if a transformation in a mapping you export uses a reference table. Location where you want to save reference tables. The Developer tool saves the reference tables as dictionary.dic and.dat files. Data Integration Service on which the reference table staging database runs. Code page of the PowerCenter repository. 4
Exporting a Logical Data Object Read Mapping Export the logical data object read mapping through the Developer tool. 1. Click File > Export. The Export dialog box appears. 2. Select Informatica > PowerCenter. 3. Click Next. The Export to PowerCenter dialog box appears. 4. Select the project that contains the mapping. 5. Select the PowerCenter release number. 6. Choose the export location, a PowerCenter import XML file or a PowerCenter repository. 7. If you export to a PowerCenter repository, select the PowerCenter or the pmrep control file. 8. Specify the export options. 9. Click Next. The Developer tool prompts you to select the objects to export. 10. Select the logical data object read mapping and click Finish. The Developer tool exports the mapping to a PowerCenter mapplet. 11. If the mapping contains any transformation that uses reference data, copy the reference table files to the PowerCenter dictionary directory on the machine that hosts Informatica Services: <PowerCenter Installation Directory>\services\<Informatica Developer Project Name>\<Informatica Developer Folder Name> Rules and Guidelines for Exporting to PowerCenter Due to differences between the Developer tool and PowerCenter, there are rules and guidelines you must follow when you export objects to PowerCenter. Verify that object names are unique. If you export an object to a PowerCenter repository, the export process replaces the PowerCenter object if it has the same name as an exported object. Verify that the code pages are compatible. The export process fails if the Developer tool and PowerCenter use code pages that are not compatible. Do not export objects with long names. You cannot import a mapping, mapplet, or object within a mapping or mapplet into PowerCenter if the object name exceeds 80 characters. Do not export mapplets that concatenate ports. The export process fails if you export a mapplet that contains a multi-group Input transformation and the ports in different input groups are connected to the same downstream transformation or transformation output group. Do not export nested mapplets with unconnected Lookup transformations. The export process fails if you export any type of mapping or mapplet that contains another mapplet with an unconnected Lookup transformation. 5
Copy reference data. When you export mappings or mapplets with transformations that use reference tables, you must export the reference tables. To run the associated sessions and workflows in PowerCenter, copy the reference table files to the PowerCenter dictionary directory on the machine that hosts Informatica Services: <PowerCenter Installation Directory>\services\<Informatica Developer Project Name>\<Informatica Developer Folder Name> Verify precision mode. By default, the Developer tool runs mappings and mapplets with high precision enabled and PowerCenter runs sessions with high precision disabled. If you run Developer tool mappings and PowerCenter sessions in different precision modes, they can produce different results. To avoid differences in results, run the objects in the same precision mode. Step 3: Import the Object into PowerCenter If you export an object to a PowerCenter XML file, you must import the object into the PowerCenter repository from the XML file. Use the PowerCenter Import Wizard to import objects. If you import an object with data quality transformations to PowerCenter 8.6 or 8.6.1, you must have the Informatica Data Quality Integration for PowerCenter plug-in. Whether you import objects into PowerCenter from an XML file or you export objects from the Developer tool into the PowerCenter repository, you will notice differences between the Developer tool objects and PowerCenter objects. Differences in Imported Objects The Developer tool updates mappings and mapplets that you export to ensure that the objects are valid PowerCenter objects. The Developer tool makes the following changes to objects in the PowerCenter import XML file: Creates Expression transformations in mapplets. The Developer tool creates an Expression transformation immediately downstream from each Input transformation and immediately upstream from each Output transformation. The Expression transformation contains pass-through ports. If you remove the Expression transformation, you must reconnect the Input and Output transformation ports and revalidate the mapplet. Creates multiple Input transformations in mapplets. The Developer tool creates one Input transformation for each input group in a multi-group Input transformation. Converts some data quality transformations to mapplets. The Developer tool converts Address Validation, Consolidation, Key Generator, and Match transformations to mapplets. Expands nested mapplets. The Developer tool converts a mapplet that contain other mapplets to a single mapplet, without nesting. Updates port names in multi-group transformations. In multi-group transformations, the Developer tool appends the group name to the port name. However, in SQL transformations, the Developer tool does not append the group name to the port name. Updates port names in Input and Output transformations. The Developer tool appends the Input transformation group name to the port names in Input transformations. It also appends the Output transformation name to the port names in Output transformations. For mappings exported to PowerCenter mapplets, and mapplets with targets converted to Output transformations, the Developer tool appends the target name to the port names in Output transformations. Importing Objects through the Import Wizard You can import objects into the PowerCenter repository through the PowerCenter Repository Manager, Designer, or Workflow Manager. Alternately, you can use the pmrep command line utility to import objects into the repository. 1. Open a PowerCenter Client tool, for example, the Repository Manager. 2. Open the folder into which you want to import the mapplet. 6
3. Click Repository > Import Objects. The Import Wizard opens. 4. In the Import Wizard, click Browse to locate the XML file. Select the XML file and click OK. 5. Click Next. The Import Wizard displays the mappings and mapplets in the XML file. If you import a mapping or mapplet that contains dependent objects such as sources, targets, or reusable transformations, the Import Wizard displays the dependent objects as well. 6. Select the mapplet and the dependent objects and click Add. 7. Click Next. If there are conflicts between an object you import and an existing PowerCenter object such as a duplicate object name, the Import Wizard opens the Conflict Resolution Wizard for objects in one of the folders listed in the XML file. If there are no conflicts, the Import Wizard shows the status of the folders from which you import objects as Resolved. 8. If the Conflict Resolution Wizard shows conflicts, resolve the object conflicts as they appear. Click Next to proceed through the Conflict Resolution Wizard. Click Close when you resolve all the conflicts for a folder. Note: If you cancel the Conflict Resolution Wizard for a folder, the Import Wizard displays the status of that folder as unresolved. Click Resolve in the Action column for that folder to open the Conflict Resolution Wizard and resolve the object conflicts. 9. Click Import in the Import Wizard to import the objects into the repository. The Import Wizard imports the objects into the destination repository, and displays the progress of the import process. The Output window displays the results of the import process. Errors and warnings are designated by colored text. 10. Click Done. Step 4: Create the Web Service Mapping After you export a Developer tool logical data object read mapping to a PowerCenter mapplet, you can create a web service mapping based on the imported mapplet. For example, you want to create a web service mapping that allows a call center employee to retrieve customer data based on the customer ID number. Create a web service mapping that contains the following objects: A web service source with one field, the customer ID The imported mapplet which defines the structure of the customer data A Joiner transformation that joins the web service source with the imported mapplet A web service target that contains all of the fields in the customer logical data object Creating the Mapping Create the web service mapping in the PowerCenter Designer. 1. In the Mapping Designer, click Mappings > Create Web Service Mapping > Use Source/Target Definitions. Alternately, you can create the web service source and target in the Source Analyzer and Target Designer. However, in this case, it is faster to create the web service source and target when you create the mapping in the Mapping Designer. 2. Enter a name for the web service mapping. 3. Add a source that contains a column for the customer ID. To do this, click the Add button in the Create Source area and specify the column name, datatype, and precision. 7
4. Add a target that contains all of the columns in the customer logical data object. For each port, click the Add button in the Create Target area and specify the column name, datatype, and precision. 5. Click OK. The Designer creates the web service source and target definition. 6. Open the web service mapping. 7. Add the imported mapplet to the mapping. 8. Add a Joiner transformation to join the web service source with the imported mapplet. 9. Link ports. The mapping should look like the following mapping: Step 5: Create the Web Service Session and Workflow After you create the web service mapping, create the web service session and workflow. To create a web service workflow, enable the Web Services option for a workflow. Then configure the web service and add web service sessions to the workflow. A web service session is based on a web service mapping. Note: Before you can run a web service workflow, you must create and configure a Web Services Hub in the Administrator tool and associate it with the repository that contains the web service workflow you want to run. Creating the Web Service Session and Workflow Create the web service session and workflow in the PowerCenter Workflow Manager. 1. In the Workflow Manager, open the Workflow Designer and click Workflows > Create. 2. Enter the name for the workflow. 3. To select the Integration Service to run the workflow, click the Browse Integration Service button and select from the list. 4. Enable the Web Services option and click Config Service to configure the web service workflow. 5. Configure the web service workflow properties as necessary. 6. Click OK. 7. Click Tasks > Create. 8. Select the session task and enter the name for the session. 8
9. Click Create. 10. Select the web service mapping and click OK. 11. Click Done. 12. Link the Start task with the web service session. 13. Save the workflow. Authors Lori Troy Senior Technical Writer Lalitha Sundaramurthy Senior Product Manager 9