InformaticaCloudEnterpriseLabs11-2011

Embed Size (px)

Citation preview

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    1/90

    Informatica Cloud Enterprise Lab Guide 1

    Informatica

    Cloud EnterpriseTraining Class

    Student Lab GuideVersion ICS 2011-11

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    2/90

    2 Informatica Cloud Enterprise Lab Guide

    Informatica Cloud Enterprise Training Class - Student Lab GuideVersion 2.0

    No 2011

    Copyright (c) 1998-2011 Informatica Corporation.

    All rights reserved. Printed in the USA.

    This software and documentation contain proprietary information of Informatica Corporation and are provided under a license

    agreement containing restrictions on use and disclosure and are also protected by copyright law. Reverse engineering of the softwareis prohibited. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying,

    recording or otherwise) without prior consent of Informatica Corporation.

    Use, duplication, or disclosure of the Software by the U.S. Government is subject to the restrictions set forth in the applicable software

    license agreement and as provided in DFARS 227.7202-1(a) and 227.7702-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988),

    FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable.

    The information in this document is subject to change without notice. If you find any problems in the documentation, please report

    them to us in writing. Informatica Corporation does not warrant that this documentation is error free. Informatica, PowerMart,

    PowerCenter, PowerChannel, PowerCenter Connect, MX, and SuperGlue are trademarks or registered trademarks of Informatica

    Corporation in the United States and in jurisdictions throughout the world. All other company and product names may be trade namesor trademarks of their respective owners.

    Portions of this software are copyrighted by DataDirect Technologies, 1999-2002.

    Informatica PowerCenter products contain ACE (TM) software copyrighted by Douglas C. Schmidt and his research group at

    Washington University and University of California, Irvine, Copyright (c) 1993-2002, all rights reserved.

    Portions of this software contain copyrighted material from The JBoss Group, LLC. Your right to use such materials is set forth in the

    GNU Lesser General Public License Agreement, which may be found at http://www.opensource.org/licenses/lgpl-license.php. The

    JBoss materials are provided free of charge by Informatica, as-is, without warranty of any kind, either express or implied, including

    but not limited to the implied warranties of merchantability and fitness for a particular purpose.

    Portions of this software contain copyrighted material from Meta Integration Technology, Inc. Meta Integration is a registered

    trademark of Meta Integration Technology, Inc.

    This product includes software developed by the Apache Software Foundation (http://www.apache.org/). The Apache Software is

    Copyright (c) 1999-2005 The Apache Software Foundation. All rights reserved.

    This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit and redistribution of this softwareis subject to terms available at http://www.openssl.org. Copyright 1998-2003 The OpenSSL Project. All Rights Reserved.

    The zlib library included with this software is Copyright (c) 1995-2003 Jean-loup Gailly and Mark Adler.

    The Curl license provided with this Software is Copyright 1996-200, Daniel Stenberg, . All Rights Reserved.

    The PCRE library included with this software is Copyright (c) 1997-2001 University of Cambridge Regular expression support is

    provided by the PCRE library package, which is open source software, written by Philip Hazel. The source for this library may be

    found at ftp://ftp.csx.cam.ac.uk/pub/software/programming/ pcre.

    InstallAnywhere is Copyright 2005 Zero G Software, Inc. All Rights Reserved.

    Portions of the Software are Copyright (c) 1998-2005 The OpenLDAP Foundation. All rights reserved. Redistribution and use in

    source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License, available

    at http://www.openldap.org/software/release/license.html.

    This Software is protected by U.S. Patent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775 and other U.S.

    Patents Pending.

    DISCLAIMER: Informatica Corporation provides this documentation as is without warranty of any kind, either express or implied,including, but not limited to, the implied warranties of non-infringement, merchantability, or use for a particular purpose. The

    information provided in this documentation may include technical inaccuracies or typographical errors. Informatica could make

    improvements and/or changes in the products described in this documentation at any time without notice.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    3/90

    Informatica Cloud Enterprise Lab Guide 3

    Link to Training Web Site ............................................................................................................... 4Unit 0: Setting up the Lab Environment: Pre-Steps ........................................................................ 5 Unit 1 Lab 1: Export an Informatica Cloud Task and Import into PowerCenter ............................ 6Unit 2 Lab 1: Create and Export a Plug-in for Use in Informatica Cloud ..................................... 10

    Unit 2 Lab 2: Using a Plug-in in a DSS Task ................................................................................ 14Unit 2 Lab 3: Modifying a Plug-in ................................................................................................ 16Unit 2 Lab 4: Importing and Running a Workflow as a PowerCenter Service Task .................... 18Unit 3 Lab 1: Create a PowerCenter Service that Converts a Fixed-Width File to a Flat File ...... 20Unit 3 Lab 2: Converting from XML to Flat File.......................................................................... 28Unit 3 Lab 3: Using the PowerCenter Service Task in a Task Flow ............................................. 34Unit 4 Lab 1: Modifying the Aggregator Plug-in .......................................................................... 35Unit 4 Lab 2: Creating a Plug-in that De-dupes Source Records .................................................. 40Unit 4 Lab 3 (BONUS): Making the Plug-in that De-dupes Source Records Case-Insensitive .... 44Unit 5 Lab 1: Calling a Twitter Method via the REST API .......................................................... 45Unit 6 Lab 1: Calling a SOAP Style Web Service via RPC .......................................................... 49Unit 7 Lab 1: Creating a Plug-in that Uses the Salesforce Merge Transformation to Merge

    Duplicate Leads ............................................................................................................................. 54Unit 8 Lab 1: Creating a Log-In Plug-in (Using Casual Token-Style Authentication) ................. 59Unit 7 Lab 2: Creating a Convert Leads Plug-in that Uses an Authentication Token ................... 66Unit 7 Lab 3: Creating a Log-Out Plug-in (Using Casual Token-Style Authentication) .............. 69Unit 8 Lab 1: Creating a Plug-in that calls the Informatica Cloud REST API (login resource) ... 71Unit 8 Lab 2: Creating a Plug-in that calls the Informatica Cloud REST API (activityLog) ........ 76Unit 8 BONUS Lab: Using the Informatica Cloud REST API to Create Real-Time Integration . 81Unit 10 - Workshop: Bringing it All Together .............................................................................. 84Appendix A How to Reset Security Token and Create a Salesforce Connection ...................... 86Appendix B Creating an External ID field in Salesforce ........................................................... 88 Appendix C Creating a Pass-Through Port in the Web Services Consumer Transformation .... 90

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    4/90

    4 Informatica Cloud Enterprise Lab Guide

    Link to Training Web Site

    During this course, you will access resources via a training web site. The URL for this web site isas follows:

    http://ec2-75-101-208-253.compute-1.amazonaws.com/TrainingHelp/Main2.aspx

    Note: You should bookmark this URL, as you will use it repeatedly throughout the class.

    Informatica Cloud Login Information

    During this course, you will use Informatica Cloud. All work should be completed in the

    Training org, so the Instructor can review your progress. Your username and password will be

    provided to you by your Instructor. Please note them below.

    Informatica Cloud Training Login:

    ____________________________________

    Informatica Cloud Training Password:

    ____________________________________

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    5/90

    Informatica Cloud Enterprise Lab Guide 5

    Unit 0: Setting up the Lab Environment: Pre-StepsFor purposes of this training class, you will complete all Informatica Cloud work in a

    Training org, so that the Instructor can monitor your progress. You will also access

    some resources available within the training org such as database connections.

    When you run tasks, you will often insert data to/read data from Salesforce.com as aSaaS end-point. So that you can verify the results of your work, you will work with

    your own Developer or Sandbox Salesforce account.

    To prepare for the labs in this course, complete the following pre-steps:

    1. Install the Informatica Cloud secure agent (from the training org) on yourlocal machine.

    2. Create a Salesforce Connection (name the connection SXX-Salesforce where XX is your student number).

    Note: If you do not know how to create a Salesforce connection (including

    obtaining a security token in Salesforce), step-by-step instructions areprovided in Appendix A, at the end of this Lab Guide.

    3. Create a flat file connection (name the connection SXX-Flat Files whereXX is your student number).

    Note: These pre-steps should take approximately 15 minutes to complete.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    6/90

    6 Informatica Cloud Enterprise Lab Guide

    Unit 1 Lab 1: Export an Informatica Cloud Task andImport into PowerCenter

    Business Scenario:

    A business user (you or someone else) has created a task in Informatica Cloud. You

    would now like to import that task into PowerCenter so you can review it, optionally

    make changes to it, or manage/run it as part of your ICC (Integration Competency

    Center).

    Lab Scenario:

    In this lab, you will create a simple data synchronization task that loads data into the

    Account object in Salesforce. You will then export the task from Informatica Cloud

    and import the resulting workflow into PowerCenter.

    Goals:

    Upon completion of this lab, you should be able to: Understand how to export an Informatica Cloud task Understand how to import a PowerCenter workflow Understand the interoperability between Informatica Cloud and

    PowerCenter.

    Duration:

    This lab should take approximately 15 minutes.

    InstructionsStep 1. Create an external id field on the Account object in Salesforce.

    1) If the Account object in your Salesforce org doesnt already have an ExternalID field, create one by adding a new custom field to the Account object andmarking it as an external id field.

    Note: If you are not familiar with the process for creating an External ID fieldin Salesforce, step-by-step instructions are provided in Appendix B, at the end

    of this Lab Guide.

    Step 2. Create a data synchronization task that upserts account datainto your Salesforce org.

    1) Create a new data synchronization task.2) Specify the following properties for the task:

    o Task Name: SXX_LoadAccountso Task Operation: Upsert

    o Source Connection: Lab SQLServero Source Object: Accounto Target Connection: SXX_Salesforceo Target Object: Account

    3) Map the following fields:Source Field Target FieldAccount_name Name

    Area_code & Phone_number Phone

    AccountId Account_External_ID__c (or

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    7/90

    Informatica Cloud Enterprise Lab Guide 7

    other field with external ID

    property)

    AccountType Type

    4) Save the task.5) Run the task.6) Verify that the task ran properly by checking that the accounts are now in

    Salesforce.Note: To view the list of accounts in the source table, go to the Training website and click on the DB Accounts link to view the contents of the Accountstable.

    Step 3. Export the task.1) Go to the Data Services -> Data Synchronization page.2) Locate the task you created, above, in the list.3) Click the Download Mapping XML icon for the task:

    4) Click the Save button.

    5) Select a location on your local machine and save the file.Step 4. Import the task into PowerCenter.

    1) Open the Repository Manager application.2) Create a new folder in your repository. This folder will be used to store all of

    the examples you will create and import during this class.

    3) Select Repository -> Import Objects.4) Click the Browse button and locate the workflow you exported, above.

    5) ClickOK.6) ClickNext to begin the import.7) Click the Add All button to import all workflow objects:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    8/90

    8 Informatica Cloud Enterprise Lab Guide

    NOTE: It is very important, when importing workflow XML into PowerCenter(as you will, throughout this class), that you import all objects. ALWAYSclick the Add All button.

    8) ClickNext.9) Click in the Destination folder field to select the folder you created for this

    class.

    10)Select the folder and clickOK:

    11)Contiue to clickNext to import workflow objects.12)For any conflict resolutions found, select the Reuse option:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    9/90

    Informatica Cloud Enterprise Lab Guide 9

    13)Finish the import.

    Step 5. Examine the mapping.1) Open the PowerCenterDesigner application.2) Open the Mapping Designer tool.3) Open the Mappings folder and locate the mapping that was imported (it will

    be named something like m_dss_xxxx, where xxxx is the task number in

    Informatica Cloud).

    4) Open the mapping.5) Examine the mapping.6) List the transformation that is used in the mapping:

    _______________________________________________________________

    Step 6. Modify the mapping (BONUS STEP) and upload to Informatica

    Cloud.If you have time, you can perform the following steps.

    1. Open the Expression transformation.2. Edit the expression in the Phone_OUT output port so that it formats the

    phone number as follows: (xxx) xxx-xxxx.

    3. Save the mapplet.4. Export the mapplet XML.5. Import the mapplet into Informatica Cloud as a PowerCenter Service task.6. Locate one of the accounts that you just loaded into Salesforce Honeywell

    or Cox Media, for example.

    7. Examine the format of the phone number.8. Run the PowerCenter Service task.

    9. Verify that the phone number format is updated.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    10/90

    10 Informatica Cloud Enterprise Lab Guide

    Unit 2 Lab 1: Create and Export a Plug-in for Use inInformatica Cloud

    Business Scenario:

    You must create a plug-in that will take a number of source rows (by AccountID) and

    format them for insertion into a multi-select picklist in Salesforce.

    Lab Scenario:

    In this lab, you will complete the following steps:

    1. Import an existing PowerCenter workflow to your own PowerCenterrepository.

    2. Examine and understand the mapping.3. Update the workflow session to reflect your own environment.4. Validate and test the workflow.5. Export the workflow for use as an Informatica Cloud plug-in.

    6. Create a plug-in in Informatica Cloud and import the XML file.

    Goals:

    Understand how to import a workflow into PowerCenter. Understand how to export a workflow from PowerCenter. Understand how to create a plug-in and import XML in Informatica Cloud.

    Duration:

    This lab should take approximately 20 minutes.

    Instructions

    Step 1. Download the workflow xml and import into the RepositoryManager.Note: You may wish to create a separate folder in your repository for the examples

    you will create in this class.

    1) Go to the Training web site.2) Navigate to the Workflow XML directory and download the following file:

    wf _Pi ckLi st Pi vot . xml3) Import the xml into your PowerCenter Repository Manager.

    Note: Throughout this class, when you import the workflow xml into

    PowerCenter, be sure to follow the steps in the previous lab click the Add All

    button to import all objects, select the Destination folder, and select the Reuse

    option for session conflicts.

    Step 2. Download the source file and create the directory structure.Note: In order to test and validate the PowerCenter workflow, you will need asource file.

    1) Create the following directory structure on the machine where you are runningPowerCenter:C: \ a_I OD\ Fi l es\

    2) Create a subdirectory called PickListPivot.3) Create the following subdirectories under PicklistPivot:

    Src

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    11/90

    Informatica Cloud Enterprise Lab Guide 11

    Tgt4) Go to the Training web site, navigate to the Source Data Files directory, and

    download the following file:Cust omer Cer t i f i cat i ons. csv

    5) Place this file in the following directory:C: \ a_ I OD\ Fi l es\ Pi ckl i stPi vot \ Src

    Step 3. Open and examine the mapplet.1) Open the PowerCenter Designer application.2) Open the mapplet, PickListPivotMapplet, in the Mapplet Designer tool.3) Open the Aggregator transformation.4) What does the transformation do?

    ___________________________________________________

    ___________________________________________________

    5) What separator will be used between values?

    ___________________________________________________

    6) Do you think the input and output fields that will display in Informatica CloudDSS task Field Mapping are intuitive for the business user?

    7) Optionally, change the field names in the Input and Output transformations.Step 4. Edit and run the workflow.

    1) Open the PowerCenterWorkflow Manager application.2) Open the workflow, wf_PickList_Pivot, in the Workflow Designer tool.3) Edit the session task.4) On the Mapping tab, click on the source and enter the following value for

    source file directory:C: \ a_ I OD\ f i l es\ Pi ckLi stPi vot \ Src

    5) Enter the following value forsource filename:Cust omer _cer t i f i cat i ons. csv

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    12/90

    12 Informatica Cloud Enterprise Lab Guide

    6) Click on the target and enter the following value foroutput file directory:C: \ a_ I OD\ f i l es\ Pi ckLi stPi vot \ Tgt

    7) Enter the following value foroutput filename:Pi ckl i stpi vot . out

    8) For the Header Options attribute, select Output Field Names.

    9) Save the workflow.10)Run the workflow.11)Using the Workflow Monitor, verify that the task succeeded.12)Locate and open the output file. The output should look something like this:

    Step 5. Export the workflow.1) From the Repository Manager, export the workflow.2) Save the xml file to your desktop.

    Step 6. Create a plug-in in Informatica Cloud.1) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.

    2) Go to the Configuration > Plug-ins page.3) Click the New button.4) EnterSXX- Pi ckl i s tPi vot (where XX is your student number) for the

    plug-in name.

    5) Select True for the Active option.6) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.

    7) The page should look like this:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    13/90

    Informatica Cloud Enterprise Lab Guide 13

    8) ClickOK to save the plug-in.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    14/90

    14 Informatica Cloud Enterprise Lab Guide

    Unit 2 Lab 2: Using a Plug-in in a DSS Task

    Business Scenario:

    You must create DSS task that will update all accounts with entries in the

    Certifications table. All data from this table with be concatenated together for eachaccount and added to the Certifications pick list field on the Account object in

    Salesforce.

    Lab Scenario:

    In this lab, you will create a data synchronization task that uses a plug-in.

    Goals:

    Understand how to use a plug-in in a data synchronization task.

    Duration:

    This lab should take approximately 15 minutes.

    InstructionsStep 1. Create the picklist field (custom field) in Salesforce.

    1) Create a custom field of type multi-select picklist on the Account object in yourSalesforce org.

    2) Name the picklist field Cer t i f i cat i ons.3) Be sure to add the field to your page layout(s).

    Step 2. Examine the source data.1) Go to the Class Resources web site.2) Click on the DB Accounts link to view the contents of the Accounts table.3) Click on the DB Certifications link to view the contents of the Certifications

    table.Step 3. Create a data synchronization task to load data from the

    Certifications table into the multi-select pick-list.1) Create a data synchronization task to take entries in the Certifications table

    and add them to a multi-select picklist in Salesforce.

    2) Specify the following properties for the task:o Task Name: SXX_LoadPickListo Task Operation: Upserto Source Connection: Lab SQLServero Source Object: Certificationso Target Connection: SXX_Salesforceo Target Object: Account

    3) On the Field Mappings page, add the SXX_PicklistPivot plug-in to the task.4) Map the following fields:

    Note that the plug-in input and output field names may vary, if you changed

    them in PowerCenter.

    Mapping Selection Source Field Target FieldSource to Plug-in AccountId KEY

    Certification ITEM

    Plug-in to Target ITEM_LIST_SEMICOLAN Certifications__c

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    15/90

    Informatica Cloud Enterprise Lab Guide 15

    KEY1 Account_External_ID_c

    5) Save the task.6) Run the task.7) Verify results by looking at a few accounts in Salesforce: Honeywell, Tyco,

    PayPal, and IBM.

    8) Note the contents of the Certifications picklist for the account, Tyco:

    ___________________________________________________

    ___________________________________________________

    9) Re-examine the contents of the Certifications table.10)Do you see a problem? How do you think this problem might be fixed?

    ___________________________________________________

    ___________________________________________________

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    16/90

    16 Informatica Cloud Enterprise Lab Guide

    Unit 2 Lab 3: Modifying a Plug-in

    Business Scenario:

    In testing the plug-in, you have noticed that not all entries for each account in the

    Certifications table are being captured in the picklist. You realize that you must sortthe records from the source before they are aggregated.

    Lab Scenario:

    In this lab, you will go back and modify the plug-in so that records are sortedbefore they are aggregated. This can be accomplished by adding a sorter

    transformation to the mapplet. Once you update the mapping and workflow, you

    will re-export the workflow XML and re-import it into Informatica Cloud.

    Goals:

    Understand how to modify a plug-in and export it from PowerCenter. Understand how to update a plug-in in Informatica Cloud.

    Duration:

    This lab should take approximately 15 minutes.

    InstructionsStep 1. Edit the mapplet.

    1) Go back to PowerCenter Designer and edit the PicklistPivotMapplet mapplet.2) Remove the existing field mappings between the Input transformation and the

    Aggregator transformation.

    3) Add a sorter transformation to the mapplet.4) Drag the Key and Item fields from the Input transformation to the new Sorter

    transformation.5) The sorter transformation should have the following properties (Ports tab):

    Ports Datatype Precision I O Key

    Key String 20 Ascending

    Item String 100

    6) Map fields from the Sorter transformation to the Aggregator transformation.7) Save the mapplet.

    Step 2. Update the workflow.1) Go back to PowerCenter Workflow Manager.2) Open the workflow, wf_PickList_Pivot.3) Right-click on the session and select Validate.4) Run the workflow

    5) Check the PowerCenter Workflow Monitor to verify that the task succeeded.6) Verify the results by opening the output file. The file contents should look

    something like this:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    17/90

    Informatica Cloud Enterprise Lab Guide 17

    Step 3. Export the workflow.1) Export the workflow and save the file to your desktop (use a different file name

    this time add v2, for example).

    Step 4. Modify the plug-in in Informatica Cloud.1) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.

    2) Go to the Configuration > Plug-ins page.3) Locate the plug-in you created in a previous lab, SXX-PicklistPivot (where

    XX is your student number).

    4) Click the pencil icon to edit the plug-in.5) Click the Browse button in the Mapplet XML file field to locate the new xml

    file (saved to your desktop in the previous step).

    6) ClickOK to save the changes to the plug-in.Step 5. Re-run the data synchronization task.

    1) Run the data synchronization task, SXX_LoadPickList (created in a previouslab).

    2) Verify your results in Salesforce.3) Examine the following account: Tyco, and compare to the notes you took in

    Lab 2, above.4) Compare to the Certifications table.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    18/90

    18 Informatica Cloud Enterprise Lab Guide

    Unit 2 Lab 4: Importing and Running a Workflow as aPowerCenter Service Task

    Business Scenario:

    In some cases, you will need to upload and run the workflow XML as a PowerCenter

    Service task, rather than as a plug-in.

    Lab Scenario:

    In this lab, you will import the XML into Informatica Cloud as a PowerCenterService task, rather than a plug-in. Note that when you run a PowerCenter

    workflow this way in Informatica Cloud, the directories for source and target

    files are hard-coded in the session task. Therefore, you must first set up the

    directory structure on the agent machine.

    Goals:

    Understand how to run a PowerCenter workflow as a PowerCenter Servicetask in Informatica Cloud.

    Duration:

    This lab should take approximately 10 minutes.

    InstructionsStep 1. Make a copy of the XML file and rename.

    1) Copy the workflow XML file that you exported from PowerCenter, in theprevious lab (it should be located on your desktop).

    2) Rename the file for example, add _pcs to the filename:

    wf _Pi ckLi st _Pi vot v2_pcs. xml .Note: You must rename the file, as you cannot import a plug-in orPowerCenter Service xml file with the same name as one that was already

    imported.

    Step 2. Create a PowerCenter Service.1) Go back to Informatica Cloud.2) Click on the Data Services > PowerCenterService page.3) Click the New button.4) Enter the following details for the task:

    o Task Name: SXX_PickListPivoto Secure Agent: Select your secure agent from the list.o Workflow XML: Click the Upload XML File button and locate the

    XML file that you copied and renamed in Step 1, above.5) ClickOK.6) ClickSave to save the PowerCenter Service.

    Step 3. Set up the directory structure.Note: ONLY complete this step if you are running the Informatica Secure Agent ona different machine as PowerCenter.

    1) Create the following directory structure on the secure agent machine:C: \ a_ I OD\ Fi l es\ Pi ckl i stPi vot

    2) Create the following sub-directories:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    19/90

    Informatica Cloud Enterprise Lab Guide 19

    SrcTgt

    3) Go to the training web site and download the following file:customer_certifications.csv.

    4) Copy it to the Src directory.Step 4. Run the PowerCenterService and verify results.

    1) Go to the Data Services> PowerCenterService page.2) Locate your task, SXX_PickListPivot.3) Run the task by clicking the green run button.4) Check the Activity Log to verify that the task ran successfully, and completed

    without errors.

    5) Navigate to the Tgt directory you created above, and verify results by openingthe picklistpivottarget.out file.

    6) The results should look something like this:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    20/90

    20 Informatica Cloud Enterprise Lab Guide

    Unit 3 Lab 1: Create a PowerCenter Service thatConverts a Fixed-Width File to a Flat File

    Business Scenario:

    You receive a fixed-width file each day from a partner and need to load the contents

    of the file into Salesforce as leads.

    Lab Scenario:

    In this lab, you will create a PowerCenter service that converts a fixed-widthformat file to a flat file, so the file can be used as the source in an Informatica

    Cloud task. Using a PowerCenter Service task and a data synchronization task

    (run together in a Task Flow), you will take the contents of a fixed-width file and

    load them into the Salesforce Lead object.

    Goals:

    Understand how to create a PowerCenter Service from scratch. Understand how to use the Source Analyzer in PowerCenter for fixed-width

    format files.

    Understand how to use a PowerCenter Service in a task flow.

    Duration:

    This lab should take approximately 20 minutes.

    InstructionsStep 1. Download the fixed-width file.

    1) Create a new subdirectory underc: \ a_I OD\ Fi l es called Fi xedFor mat .

    2) Create a Src subdirectory.3) Go to the Training web site and navigate to the Source Files directory.4) Download the file, St udent _Lead. t xt . 5) Save it to the directory you created.

    Step 2. Use the Source Analyzer tool to create a definition for the file.1) In PowerCenter Designer, open the Source Analyzer tool.2) From the Sources menu, select Import from File.3) Locate the file you downloaded in the previous step and select it:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    21/90

    Informatica Cloud Enterprise Lab Guide 21

    The Flat File Import Wizard is launched.

    4) Select Fixed Width and click the Next button.5) Use the following table (from the specification) to properly parse the fields:

    Electronic Student Record Layout

    Field Position Field Name

    1 1 - 2 Reporting Year

    2 3 - 27 Last Name

    3 28 - 43 First Name

    4 44 Middle Initial

    5 45 - 69 Street Address

    6 70 - 116 Email Address7 117 143 City

    8 144 - 145 State

    9 146 - 154 Zip Code

    10 155 - 166 Phone

    6) Once you have identified all of the columns, click the Next button:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    22/90

    22 Informatica Cloud Enterprise Lab Guide

    7) On the next page (Step 3 of 3), specify the name and datatype (you can makethem all text fields) for each column:

    8) Click the Finish button when you are finished.

    The source definition appears in the workspace and should looksomething like this:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    23/90

    Informatica Cloud Enterprise Lab Guide 23

    9) Save your changes.Step 3. Use the Target Designer tool to create a target definition.

    1) In PowerCenter Designer, open the Target Designer tool.2) Create the target by dragging the source definition (created in previous step)

    into the workspace.3) Edit the target and change the following settings on the Table tab:

    4) Click the Advanced button and verify that the Column Delimiters fieldcontains a comma:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    24/90

    24 Informatica Cloud Enterprise Lab Guide

    5) Save changes.Step 4. Create a mapping.

    1) Create a mapping that maps the Source Definition you created to the TargetDefinition you created.

    Note that the mapping should look something like this:

    Validate and save the mapping.

    Step 5. Create a workflow.1) To quickly create a workflow for this mapping, right-click in the workspace

    and select Generate Workflow.The Workflow Generation wizard is launched.

    2) Select the Workflows with a reusable session option:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    25/90

    Informatica Cloud Enterprise Lab Guide 25

    3) Step through the wizard to complete the workflow.Step 6. Update the session properties.

    1) Go to PowerCenter Workflow Manager and open the session in the TaskDeveloper tool.

    2) Go to the Mapping tab and select the source.3) Click on the Set File Properties link:

    4) The Flat Files Sources dialog is displayed.5)

    Click the Advanced button:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    26/90

    26 Informatica Cloud Enterprise Lab Guide

    6) Set the properties in the Others section as shown in the image below:

    7) ClickOK.8) Save changes.

    Step 7. Update the workflow properties.1) Edit the workflow in the Workflow Designer tool.2) Edit the Source and Target file properties on the Mapping tab.

    3)Select the Output Field Names option for the Target.

    4) Save your changes.Step 8. Validate and run the workflow.

    1) Validate and run the workflow.2) Verify results by examining the output file that was created.

    Step 9. Export the workflow and create a PowerCenter Service Task.1) Export the workflow.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    27/90

    Informatica Cloud Enterprise Lab Guide 27

    2) Import the workflow as a PowerCenter Service in Informatica Cloud use the naming convention, SXX_Fi xedFormat t oFF.

    3) Run the PowerCenter Service task and verify results on the agentmachine.

    Step 10. Create a data synchronization task and task flow.

    1) Create a data synchronization task that loads data from the resulting flatfile into the Salesforce Leads object.2) Name the taskSXX_Fi xedWi dt hI nser t Leads.3) Note that you will need to create a Flat File connection that points to the

    directory where the resulting file (created by the PowerCenter Service

    task) is stored.4) Create a task flow that includes the PowerCenter Service and the data

    synchronization task.

    5) Name the task flow SXX_Fi xedWi dthLeads .6) Run the task flow and verify results in Salesforce.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    28/90

    28 Informatica Cloud Enterprise Lab Guide

    Unit 3 Lab 2: Converting from XML to Flat File

    Business Scenario:

    You have an export of accounts and contacts from a legacy system. The data is in a

    hierarchical XML file, and you need to load it into Salesforce.

    Lab Scenario:

    In this lab, you will create two PowerCenter Service tasks. Each task will convert a

    hierarchical XML file into a corresponding flat file - so it can be used as the source in

    an Informatica Cloud task. You will then create two data synchronization tasks one

    that loads customer data into the Salesforce Account object, and one that loads

    Contact data into the Salesforce Contact object.

    Goals:

    Understand how to use PowerCenters Source Analyzer tool to import an XMLsource.

    Understand how to create a target flat file for the XML source.

    Duration:

    This lab should take approximately 15 minutes

    Step 1. Download the xml file.1) Go to the training web site and navigate to the Source Files directory.2) Download the file, Cust omersCont act s_Sampl e. xml and save it to a

    location on the machine where you are running PowerCenter (create a new

    folder in the a_I OD\ Fi l es directory called Par seXML).

    Step 2. Use the Source Analyzer tool to create a definition for the file.1) In PowerCenter Designer, go to the Source Analyzer tool.

    2) From the Sources menu, select Import XML Definition.3) Locate the file you downloaded in the previous step and select it:

    4) Before you clickOpen, click the Advanced Options link (at the bottom of thedialog box).

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    29/90

    Informatica Cloud Enterprise Lab Guide 29

    The Change XMLViews Creation and Naming Options dialog is displayed.5) Select the first checkbox and enter 100 in the value field:

    6) ClickOK.7) ClickOpen to import the file.

    The XML Wizard is displayed.

    8) ClickNext, then Finish.9) Save your changes.

    Step 3. Download the target flat files.Note that when you are converting an XML file to one or more flat files, you

    must create the target flat file(s). In order to do this, youll need to think aboutthe columns you want to have in the resulting flat file. To save time, and for

    purposes of this lab, you will use flat files that have already been created.

    1) Go to the Training web site and navigate to the Target Files directory.2) Download the following files:

    Companies.csvContacts.csv

    3) Save both files to the a_IOD\Files\ParseXML\ Tgt folder.Step 4. Use the Target Designer tool to create target definitions.

    1) In PowerCenter Designer, go to the Target Designer tool.2) Select Import from File from the Targets menu.3) Locate the first file you downloaded in the previous step and select it:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    30/90

    30 Informatica Cloud Enterprise Lab Guide

    4) ClickOK.5) The Flat File Import Wizard is displayed.6) On Step 1 of 3, be sure to select the Import field names from first line option

    and clickNext:

    7) ClickNext again.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    31/90

    Informatica Cloud Enterprise Lab Guide 31

    8) On Step 3 of the wizard, be sure to increase the Length/Precision of all fieldsin the target file (you can use the vale 30 for most fields, and may want to use

    50 for address fields):

    Note that you will need to click on each field in the Source definition list andadjust the Length/Precision:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    32/90

    32 Informatica Cloud Enterprise Lab Guide

    9) ClickNext, then Finish to import the target.

    10)Repeat the steps for the second file.11)Save your changes.Step 5. Create a mapping for customers (accounts).

    1) Create a new mapping.2) Drag-and-drop the XML source (CustomersContacts_Sample.xml) that you

    created previously to add it to the mapping.

    3) Drag-and-drop the flat file target (Companies.csv) you created previously toadd it to the mapping.

    4) Drag and drop the fields under the X_Customer object from the SourceQualifier to the Target:

    5) Save your changes.Step 6. Create a mapping for contacts.

    1) Create a new mapping.2) Drag-and-drop the XML source (CustomersContacts_Sample.xml) that you

    created previously to add it to the mapping.

    3) Drag-and-drop the flat file target (Contacts.csv) you created previously to addit to the mapping.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    33/90

    Informatica Cloud Enterprise Lab Guide 33

    4) Drag and drop the fields (under the X_Contact object) from the SourceQualifier to the Target:

    5) Save your changes.

    Step 7. Create workflows.1) Create a workflow for each of the mappings.2) Edit the workflow and edit the Source and Target file properties on the

    Mapping tab.3) Save your changes.

    Step 8. Validate and run the workflows.1) Validate and run each workflow.2) Verify results by examining the output file that is created.

    Step 9. Export the workflows and create PowerCenter Service Tasks.1) Export the workflows.2) Import each workflow as a PowerCenter Service Task in Informatica

    Cloud use the following naming convention for the tasks:

    SXX_Par seXMLCont act s and SXX_Par seXMLCompani es.3) Run the PowerCenter Service tasks and verify results on the agent

    machine.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    34/90

    34 Informatica Cloud Enterprise Lab Guide

    Unit 3 Lab 3: Using the PowerCenter Service Task ina Task Flow

    Lab Scenario:

    Now that you have two PowerCenter Service tasks that convert the XML file into

    corresponding flat files, you can use the resulting flat files as the source in a Data

    Synchronization task. In this lab, you will create two Data Synchronization tasks

    that use the resulting flat files as a source, and add all tasks to a task flow, so they

    can be run together. Note that you must create two Data Synchronization tasks

    one to load the Account object, and one to load the Contacts object in Salesforce.

    Goals:

    Understand how to use the output (resulting file) from a PowerCenter Servicetask as the source for a data synchronization task.

    Understand how to add a PowerCenter Service task to a task flow.

    Duration:

    This lab should take approximately 20 minutes

    Step 1. Create a data synchronization task that loads data into theSalesforce Account object.

    1) Create a data synchronization task that loads data from the resulting flatfile into the Salesforce Account object.

    2) Name the taskSXX_XMLUpsertAccounts.3) Note that you will need to create a flat file connection that points to the

    directory where the resulting file (created by the PowerCenter Service

    task) is stored.Step 2. Create a data synchronization task that loads data into theSalesforce Contacts object.

    1) Create a data synchronization task that loads data from the resulting flatfile into the Salesforce Contact object.

    2) Name the taskSXX_XMLUpser t Cont act s.Step 3. Create a Task Flow that contains all tasks.

    1) Create a task flow.

    2) Name the task flow SXX_XMLAccount sCont act s.3) Add both PowerCenter Service tasks.4) Select the Stop on Error option.

    5) Add the two data synchronization tasks you created, above.6) Select the Stop on Error option for the Accounts task.Step 4. Verify results.

    1) Run the task flow.2) Verify results.3) Log into Salesforce and verify that the records have been added

    properly.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    35/90

    Informatica Cloud Enterprise Lab Guide 35

    Unit 4 Lab 1: Modifying the Aggregator Plug-in

    Business Scenario:

    Order data is stored in a system outside Salesforce. You would like to total this

    order data (by Account and by Order Type) on a daily basis and load it intoSalesforce so that sales reps have access to it.

    Lab Scenario:

    In this lab, you will take the existing Aggregator plug-in and customize it to work

    specifically for your business scenario.

    Goals:

    Learn how to modify an existing plug-in. Practice using the Aggregator transformation in a plug-in. Practice using variable ports in the Aggregator transformation.

    Duration:

    This lab should take approximately 30 minutes.

    InstructionsStep 1. Examine the source data.

    1) Go to the Training web site.2) Click on the DB Orders link to view the contents of the Orders table.

    Note that this table contains the Account ID for the related account, the order

    ID, Order Total, and Order Amount. Your goal is to total (SUM) the orders for

    each customer by Order Type (Web and Direct), and display each of the

    totals on the Account record in Salesforce.

    Step 2. Download the existing Aggregator plug-in from the InformaticaMarketplace.

    1) Go to the Informatica home page (www.informatica.com).2) Click on the Marketplace link (top, right-hand corner of the page).3) Click on Blocks and select Cloud Data Integration.4) Click on the Informatica Cloud Aggregator Plug-in link.5) Click the Download button.

    Note: You will be prompted to log in.

    6) Enter your Informatica community credentials.7) Click the Download button again.8) Save the file to your local machine.9) Import the workflow into your PowerCenter Repository Manager.

    Step 3. Edit the mapplet.1) In the Designer tool, open and edit the mapplet, mplt_Aggregate_by_Choice.2) Open the Input transformation.3) Add a new port, OrderType, for passing in the Order Type.4) Rename the AGG_BY_FIELD1_in port, for better usability.5) Do the same with the IN_AGG_FIELD1_in port:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    36/90

    36 Informatica Cloud Enterprise Lab Guide

    6) Drag the new OrderType port from the Input transformation to the Expressiontransformation, and from the Expression transformation to the Sorter

    transformation.

    7) Drag the OrderType port from the Sorter transformation to the Aggregatortransformation.

    8) Open the Aggregator transformation.9) Add two new variable ports one to filter for Web, and one to filter for Direct,

    orders. The formulas for these fields follow:IIF ( Or der Type=' Di rect ' , I N_AGG_FI ELD1, 0) IIF ( Or der Type=' Web' , I N_AGG_FI ELD1, 0)

    10)You will also need to add two ports for summing orders of each type.The completed Aggregator transformation should contain the following ports:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    37/90

    Informatica Cloud Enterprise Lab Guide 37

    11)Drag the new ports to the Output transformation.12)Open the Output transformation.13)Rename the first port for better usability:

    14)Verify that the mappings are all correct.15)Save changes.

    Step 4. Import source and target definitions.1) So you can test the plug-in in PowerCenter, as well as update the mapping, you

    will need to import the following source and target definitions usingRepository Manager (make sure these are imported into the folder where you

    are doing the work for this class).

    Note that you can download the xml files from the Training web site, underthe Source and TargetFiles directories.

    o Source Definition: Orders.xmlo Target Definition: T_AGG_CUSTOM_GroupBy.xml

    Step 5. Edit the mapping.1) In the Designer tool, open and edit the mapping,

    m_CF_Aggregate_ByChoice.2) Update the mapping to use the new source and target definitions. The mapping

    should look like this:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    38/90

    38 Informatica Cloud Enterprise Lab Guide

    3) Save changes.Step 6. Test the workflow.

    1) Open the workflow, wf_Aggregate_by_Choice, in the Workflow Managertool.

    2) Refresh the mapping.3) Validate the workflow.

    4) Edit the session task and update the Source and Target file properties on theMapping tab.

    5) Save the workflow.6) Run the workflow and verify results.

    Step 7. Export the workflow.1) Export the workflow2) Save the file to your desktop or elsewhere (you will import into Informatica

    Cloud in the next step).

    Step 8. Create a plug-in in Informatica Cloud.1) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.2) Go to the Configuration > Plug-ins page.3) Click the New button.4) EnterSXX_Aggr egat or (where XX is your student number) for the plug-in

    name.

    5) Select True for the Active option.6) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.

    7) ClickOK to save.Step 9. Create two custom fields on the Account object.

    Before using the plug-in, you will need to create two custom fields on the Account

    object in Salesforce. The fields should be named something like Order Total-

    Direct Sales and Order Total Web Sales.

    Step 10. Create a task to use the plug-in.1) Create a data synchronization task to use the plug-in.2) Specify the following properties for the task:

    o Task Name: SXX_SumOrderTotalso Task Operation: Upserto Source Connection: Lab SQL Servero Source Object: Orders

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    39/90

    Informatica Cloud Enterprise Lab Guide 39

    o Target Connection: SXX_Salesforceo Target Object: Account

    3) Add the plug-in, SXX_Aggregator, on the Field Mapping page.4) Select the Source to Plug-in mapping.5) Map the following fields:

    Source Plug-in

    AccountId AccountID_inOrderTotal OrderTotal_in

    OrderType OrderType

    1) Select the Plug-in to Target mapping.2) Map the following fields:

    Source Plug-in

    AccountId_out Account_External_ID__c

    Sum_Direct Direct_Order_Total__c

    Sum_Web Web_Order_Total__c

    3) Validate the mapping.4) Save and run the task.

    Step 11. Verify results.1) View the task results in the Activity log.2) Log into Salesforce and view one of the accounts that has entries in the Orders

    table Tyco, Geneworth, or Honeywell.

    3) Verify that the Order Total fields have been updated, and contain the correctvalues.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    40/90

    40 Informatica Cloud Enterprise Lab Guide

    Unit 4 Lab 2: Creating a Plug-in that De-dupes SourceRecords

    Business Scenario:

    You regularly receive lead lists from trade shows and other events that contain

    duplicate data. Before loading these leads into Salesforce, your business users

    would like to remove the duplicate records, so that only unique records are

    loaded into Salesforce. You would like to build a plug-in that looks for duplicates

    based on up to five match fields. The user can choose which fields to use for

    matching by mapping them to the match input fields on the plug-in in the DSS

    task.

    Lab Scenario:

    In this lab, you will import an existing PowerCenter workflow and modify it. The

    existing workflow includes three match fields you will add two additional

    match fields. You will then export the workflow, create a plug-in in InformaticaCloud, and use the plug-in in a DSS task.

    Goals:

    Learn how to build a plug-in that employs brute force duplicate matching. Practice using the Sorter transformation in a plug-in. Practice using the Aggregator transformation in a plug-in.

    Duration:

    This lab should take approximately 30 minutes

    InstructionsStep 1. Examine the source file

    1) Before you modify the workflow in PowerCenter, you may wish to review anexample source file to get a sense of the fields and data.

    2) Go to the Training web site and navigate to the Source Files directory.3) Open the file, TradeShowLeads.csv.4) Note the fields that you can use as match fields for identifying duplicate

    records:

    ____________________________________________________________

    ____________________________________________________________

    ____________________________________________________________Step 2. Import the existing workflow.1) Go to the Training web site.2) Navigate to the Workflow XML directory.3) Right-click to download the wf_m_DedupeSourceRecords_3Fields.XML

    file.

    4) Save the file to your local machine.5) Import the workflow into your PowerCenter Repository Manager.

    Step 3. Edit the mapplet.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    41/90

    Informatica Cloud Enterprise Lab Guide 41

    1) In the Designer tool, open and edit the mapping, m_DedupeSourceRecords.2) Open the mapplet.3) Open the Input transformation.4) Add two additional match field ports, as follows:

    5) Drag the new ports to the Expression transformation.Step 4. Modify the Expression transformation.

    1) Open the Expression transformation.2) Modify the expression for the MATCH_KEY port (to include the two new

    match fields), as follows:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    42/90

    42 Informatica Cloud Enterprise Lab Guide

    3) Save your changes.

    Step 5. Modify the mapping.1) Return to the mapping.2) Map fields from the source to the new input fields you added to the mapplet.3) Save your changes.

    Step 6. Download the Leads source file.1) Create a new subdirectory underc: \ a_I OD\ Fi l es called De-

    DupeLeads.2) Create a Src subdirectory.3) Create aTgt subdirectory.4) Go to the Training web site and navigate to the Source Files directory.5) Download the file, TradeShowLeads.csv.6) Save it to the Src directory you created.

    Step 7. Refresh the workflow.1) In the PowerCenter Workflow Manager tool, open the workflow for the

    mapping, wf_m_DedupeSourceRecords_3Fields.

    2) Refresh the mapping.3) Edit the workflow and verify that the Source and Target file properties are

    properly set on the Mapping tab.4) Save your changes.

    Step 8. Validate and run the workflow.1) Validate and run the workflow.2) Verify results by examining the output file that was created.

    Step 9. Export the workflow and create a Plug-in.

    1) Export the workflow.2) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.

    3) Go to the Configuration > Plug-ins page.4) Click the New button.5) EnterSXX_RemoveDupes (where XX is your student number) for the plug-

    in name.

    6) Select True for the Active option.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    43/90

    Informatica Cloud Enterprise Lab Guide 43

    7) Click the Browse button in the Mapplet XML file field to locate the xml fileyou previously saved to your desktop.

    8) Save the plug-in.Step 10. Create a data synchronization task.

    1) Specify the following properties for the task:o Task Name: SXX_RemoveDupes

    o Task Operation: Inserto Source Connection: Flat file connection that contains

    TradeshowLeads.csv file

    o Source Object: TradeshowLeads.csvo Target Connection: SXX_Salesforceo Target Object: Lead

    2) Add the plug-in, SXX_RemoveDupes, on the Field Mapping page.3) Select the Source to Plug-in mapping.4) Map all of the lead fields to their corresponding input fields in the plug-in, plus

    be sure to map the following fields:

    Source Plug-in

    Name Match_Field1

    Title Match_Field2Company Match_Field3

    Street Match_Field4

    PostalCode Match_Field5

    1) Select the Plug-in to Target mapping.2) Map the following fields:

    Plug-in Target

    out_FullName Name

    out_FullName LastName

    out_CompanyName Company

    out_Title Title

    out_City Cityout_PostalCode PostalCode

    out_State State

    Out_AddressLine1 Street

    3) Validate the mapping.4) Save and run the task.

    Step 11. Verify results.1) Log into Salesforce.2) Verify that only some of the leads in the source file have been inserted into

    Salesforce.

    3) Look at the leads that were inserted do you see a problem?4) How might you correct this problem?

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    44/90

    44 Informatica Cloud Enterprise Lab Guide

    Unit 4 Lab 3 (BONUS): Making the Plug-in that De-dupes Source Records Case-Insensitive

    Business Scenario:

    The leads that you receive may vary in case. You want the duplicate matchingalgorithm to be case-insensitive.

    Lab Scenario:

    In this lab, you will modify the plug-in you built in the previous lab and make it

    case-insensitive.

    Goals:

    Learn how build modify a plug-in. Learn how to use expressions to eliminate case sensitivity when creating

    matching algorithms.

    Duration:

    This lab should take approximately 15 minutes.

    InstructionsThere are no step-by-step instructions for this lab. HINT: Try adding an expression on theMATCH_KEY port, so that the data is standardized (all characters set to same case)

    before it is sent to the Aggregator transformation.

    Note: You can also accomplish this by using expressions (in the Field Mapping step) in

    the Informatica Cloud task. Which approach do you think would be better and why?

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    45/90

    Informatica Cloud Enterprise Lab Guide 45

    Unit 5 Lab 1: Calling a Twitter Method via the RESTAPI

    Business Scenario:

    You are using an Informatica Cloud plug-in to pull Tweets that match specific

    search criteria from Twitter. You must modify the plug-in to accommodate a new

    business requirement the ability to filter results on language, so that only tweets

    in English are returned.

    Lab Scenario:

    In this lab, you will modify an Informatica Cloud plug-in that calls the Twitter

    REST API. This plug-in calls the GET Search method, which returns tweets that

    match a specified query. You will modify the plug-in to include additional

    parameters, such as language.

    Goals: Learn how to build a plug-in that calls a web service method (via REST API).

    Duration:

    This lab should take approximately 30 minutes.

    InstructionsStep 1. Examine the existing Twitter plug-in.

    1) Go to the Informatica training org.2) Click on Configuration > Plug-ins.3) Click on the z_Twitter Search plug-in to view the details of the plug-in.

    4) Note that the plug-in has one input field. List it below:

    _______________________________________________

    Step 2. Download the xml file.1) Go to the Training web site and navigate to the Workflow XML directory.2) Download the file, wf _m_Twi t t er_Search_Si mpl e. XML. 3) Import the workflow into your PowerCenter repository.

    Step 3. Download the source file.1) Create a new folder in the a_I OD\ Fi l es directory calledTwi t t er .2) Go to the Training web site.3) Click on the Source Data Files link.

    4) Download the searchCriteria.csv file and save it to the Twitter directory.Step 4. Examine the Twitter API.

    1) Use the following link to examine the Twitter API documentation for themethod youll be calling:ht t p: / / dev. t wi t t er . com/ doc/ get / sear chAs you noted above, the current plug-in only supports the q (query)

    parameter.

    2) Test the method and verify results by entering the following URL into aseparate browser tab:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    46/90

    46 Informatica Cloud Enterprise Lab Guide

    ht t p: / / sear ch. t wi t t er . com/ sear ch. at om?q=i nf or mat i ca

    Note that Informatica supports the atom XML format, and does not support the

    json format. You can replace Informatica with any search term youd like.

    You may notice that many of the tweets that are returned are in various

    languages. Your goal is to modify the plug-in so that the language parameter is

    also supported, and the plug-in returns only tweets in English.

    3) Review the complete list of parameters. Note any additional parameters youmay wish to add to the plug-in:

    _______________________________________________

    _______________________________________________

    4) Test the additional parameters by adding them to the query string portion of theURL:ht t p: / / sear ch. t wi t t er . com/ sear ch. at om?q=i nf ormat i ca&l ang=EN

    Step 5. Modify the mapplet in PowerCenter.1) In PowerCenter Designer, open the mapplet, mplt_Twitter_Search_Simple.2) Add a new output port (language) to the Input transformation:

    3) Add a new input port to the HTTP transformation:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    47/90

    Informatica Cloud Enterprise Lab Guide 47

    4) Map these new ports:

    5) Save changes.

    Step 6. Examine the Expression transformation.1) Open the expression transformation.2) Click on the Ports tab.3) Examine the expression for the out_id port what do you think this expression

    does?

    _____________________________________________________________

    _____________________________________________________________

    Step 7. Validate and export the workflow.1) Find the workflow, wf_m_Twitter_Search_Simple, in the Workflow

    Manager.

    2) Validate the workflow and save changes.

    3) Export the workflow from the Repository Manager.4) Save the file to your desktop or elsewhere (you will import into InformaticaCloud in the next step).

    Step 8. Create a plug-in in Informatica Cloud.1) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.2) Go to the Configuration > Plug-ins page.3) Click the New button.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    48/90

    48 Informatica Cloud Enterprise Lab Guide

    4) EnterSXX- Twi t t er Sear ch (where XX is your student number) for theplug-in name.

    5) Select True for the Active option.6) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.

    7) ClickOK to save.

    Step 9. Create a custom field on the cases object.Before using the plug-in, you will need to create a custom field on the cases object

    in Salesforce. Marking this field as an external ID and mapping the Tweet Id will

    prevent the insertion of duplicate tweets.

    1) Create a custom field called Tweet ID on the cases object in Salesforce.2) Mark this field as an external ID.

    Step 10. Create a task to use the plug-in.1) Create a data synchronization task to use the plug-in.2) Specify the following properties for the task:

    o Task Name: SXX_TwitterSearcho Task Operation: Upserto Source Connection: LabFileso Source Object: searchCriteria.csvo Target Connection: SXX_Salesforceo Target Object: Case

    3) Add the plug-in, SXX_TwitterSearch, on the Field Mapping page.4) Select the Source to Plug-in mapping.5) Map the query field from the Source to the plug-in.6) Enter the following expression for the language field on the plug-in:

    EN7) Select the Plug-in to Target mapping.8) Map the following fields:

    Plug-in Target: Case Expression

    Screen_Name SuppliedName

    Name Description

    Text Subject

    Text Reason

    Tweet_ID Tweet_ID__c

    Status New

    Origin Twitter

    9) Save and run the task.Step 11. Verify results.

    1) View the task results in the Activity log.Log into Salesforce and view resulting cases.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    49/90

    Informatica Cloud Enterprise Lab Guide 49

    Unit 6 Lab 1: Calling a SOAP Style Web Service viaRPC

    Business Scenario:

    You have Account data in a SaaS application (outside of Salesforce). You can

    read data from and write data to this application via a set of SOAP-style web

    services. You would like to get a list of all accounts that have been modified

    since a specific date, so you can update the corresponding accounts in Salesforce.

    Lab Scenario:

    In this lab, you will create a plug-in that calls the getRecentAccounts web service

    (SOAP style). You will then create a DSS task that uses the plug-in to upsert

    accounts in Salesforce.

    Goals:

    Learn how to build a plug-in that calls a web service operation (SOAP style viaRPC).

    Practice using the Web Services Consumer transformation in PowerCenter.

    Duration:

    This lab should take approximately 30 minutes.

    InstructionsStep 1. Create a mapplet.

    1) In the PowerCenter Designer tool, create a new mapplet.2) Add an Input transformation with the following port:

    Step 2. Add a Web Services Consumer transformation.1) Add a Web Services Consumer transformation to the mapplet.2) On the Import from File page, select the URL option.3) To get the URL for the WSDL, go back to the Training web site, right-click

    on the Orders Web Service WSDL link, and select Copy Shortcut.4) Paste the URL in the Address field:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    50/90

    50 Informatica Cloud Enterprise Lab Guide

    Note: If you are prompted to override all infinite lengths with a value, click

    Yes and enter the value 100.5) ClickOpen.6) Scroll to the top of the operation tree and select the getRecentAccounts

    operation:

    7) ClickNext.8) ClickFinish.9) Map the LastModifiedDate port on the Mapplet Input transformation to the

    tns_LastModifiedDate port on the WebServices Consumer transformation:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    51/90

    Informatica Cloud Enterprise Lab Guide 51

    10)Save the mapplet.Step 3. Add an output transformation.

    1) Add an output transformation to the mapplet.2) Drag the following ports from the Web Services Consumer transformation to

    the Output transformation:

    3) Save the mapplet.Step 4. Download the source file.

    1) Create a new subdirectory underc: \ a_I OD\ Fi l es calledGet RecentAccount s.

    2) Create a Src subdirectory.3) Create aTgt subdirectory.4) Go to the Training web site and navigate to the Source Files directory.5) Download the file, Date_Mod.csv.6) Save it to the Src directory you created.

    7) Edit the file and change the date to todays date.8) Go to the Training web site and navigate to the Target Files directory.9) Download the file, account_list.csv.10)Save it to the Tgt directory you created.

    Step 5. Import source and target definitions.1) Open the Repository Manager and import the following source and target

    definitions (from the Training web site):Date_Mod.xml

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    52/90

    52 Informatica Cloud Enterprise Lab Guide

    Account_List.xml2) Save your changes.

    Step 6. Create a mapping.1) Create a mapping and add the source definition, mapplet, and target definition.2) Map fields as follows:

    3) Save the mapping.

    Step 7. Create a workflow.1) Create a workflow for the mapping.2) Edit the workflow and edit the Source and Target file properties on the

    Mapping tab.3) Save your changes.

    Step 8. Validate and run the workflow.1) Validate and run the workflow.2) Verify results by examining the output file that was created.

    Step 9. Export the workflow and create a Plug-in.1) Export the workflow.2) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.

    3) Go to the Configuration > Plug-ins page.4) Click the New button.5) EnterSXX_Get Recent Account s (where XX is your student number) for

    the plug-in name.

    6) Select True for the Active option.7) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.

    8) ClickOK to save.Step 10. Create a task to use the plug-in.

    1) Create a data synchronization task to use the plug-in.2) Specify the following properties for the task:

    o Task Name: SXX_GetRecentAccountso Task Operation: Upserto Source Connection: Flat File connection that contains

    Date_Mod.csv

    o Source Object: Date_Mod.csvo Target Connection: SXX_Salesforceo Target Object: Account

    3) Add the plug-in, SXX_GetRecent Accounts, on the Field Mapping page.4) Select the Source to Plug-in mapping.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    53/90

    Informatica Cloud Enterprise Lab Guide 53

    5) Map the LastModifiedDate field from the Source to the plug-in.6) Select the plug-in to Target mapping.7) Map the following fields:

    Plug-in Target: Account Expression

    AccountId Account_External_ID__c

    billingStreet BillingStreet

    billingCity BillingCity

    billingCountry BillingCountry

    billingPostalCode BillingPostalCode

    billingState BillingState

    Area_code

    Phone_number

    Phone Concat(area_code,

    phone_number)

    8) Save and run the task.

    Step 11. Verify results.1) View the task results in the Activity log.2) Your instructor will tell you how many accounts were updated in the database,

    so you know how many success rows you should have.

    3) Log into Salesforce and view the accounts.4) Verify the last updated date for accounts that were changed.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    54/90

    54 Informatica Cloud Enterprise Lab Guide

    Unit 7 Lab 1: Creating a Plug-in that Uses theSalesforce Merge Transformation to Merge DuplicateLeads

    Business Scenario:

    You have run a Data Quality Assessment task, and the task has identified a number

    of duplicate lead records in your Salesforce instance. You would like to select a

    master record (the record with the most recent CreatedDate), then merge the

    duplicate records ensuring that any child objects are retained and attached to the

    mater lead.

    Lab Scenario:

    In this lab, you will create a PowerCenter mapplet that uses a Salesforce Merge

    transformation to merge duplicate records in the Lead object. You will use a Sorter

    transformation to identify the master record (finding the latest record based on value

    of the CreatedDate column). You will then use the Salesforce Merge transformationto merge the duplicate records, retaining the master record and deleting the slave

    records from Salesforce.Goals:

    Learn how to build a plug-in that uses Salesforce Merge transformation to mergeduplicate records identified by the Data Assessment Service and use the

    Salesforce connection.

    Duration:

    This lab should take approximately 30 minutes.

    InstructionsStep 1. Create duplicate lead(s) in Salesforce.

    1) Log into your Salesforce instance and view existing leads.2) Note the details of one or more leads.3) Use these details to create one or more duplicate leads.

    Note that you can use the Clone button to clone a lead.

    Step 2. Create and run a data assessment task to identify duplicateleads.

    1) Create a data assessment task.2) Specify the following properties for the task:

    o Source Connection: SXX_Salesforceo Data Object: Lead

    3) On Step 2, Quality Metrics, click on the Customize Weights button next toDuplicates.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    55/90

    Informatica Cloud Enterprise Lab Guide 55

    4) Configure the matching algorithm to identify duplicate records by assigningweights to the following fields:

    Task Field Weight

    Last Name 20

    First Name 20

    Postal Code 30Phone 15

    Email 15

    5) Enter 85 in the Threshold Value field.6) Un-check the Field Level Metrics checkboxes forCompleteness,

    Conformance, and Address Validation.7) Save the task.8) Run the task.9) Click the View Results button to view the results of the task:

    10)Click on the hyperlink, x% of Lead records are duplicate in the TopIssues section.

    11)Add the following fields to the list of Selected Fields: ID, FirstName,LastName, Company, Street, City, State, PostalCode, Country, Phone, Email,

    CreatedDate.12)Click the Fetch Data button.13)Click the Download to Excel button.14)Click on Home -> Data Files.15)Click the Download File button for your file and and save the file to the

    following source directory:C: \ a_I OD\ Fi l es\ SF_Mer ge_Dupl i cat es\ Sr cNote: This directory should be created on the machine running the Secure

    Agent.

    16)Open the file and delete the top 6 lines (so that the header row is the first row),and save your changes.

    Step 3. Download the workflow xml and import into the Repository

    Manager.1) Go to the class web site.2) Navigate to the Workflow XML directory and download the following file:

    wf_Merge_SF_Leads_Dups.XML.xml3) Import the xml into your PowerCenter Repository Manager.

    Step 4. Edit the mapplet.1) Open the mapplet, mplt_Merge_Lead_PC_Mkt, in the Designer tool.2) Add a Salesforce Merge transformation to the mapplet.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    56/90

    56 Informatica Cloud Enterprise Lab Guide

    The Import tables from Salesforce.com dialog is displayed.3) Enter your Salesforce username and password.4) Add the Salesforce security token to the end of the password (no space).

    5) ClickConnect and choose the Lead object to import.6) Delete the existing Salesforce Merge transformation and map fields to the new

    transformation.

    7) Validate the mapplet.8) Save the mapplet.

    Step 5. Validate the mapping.1) Open the mapping, m_Merge_SF_Leads-Dups.2) Validate and save the mapping.

    Step 6. Edit the workflow.

    1) In the Workflow Manager, click on the Application Connection Browser, andSelect Type: Salesforce Connection.

    2) ClickNew:

    3) Enter the username and password:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    57/90

    Informatica Cloud Enterprise Lab Guide 57

    4) Click on the session to make sure the correct value is chosen for the SalesforceConnection.

    5) On the Mapping tab, select the mapplet object, and select the correctconnection value:

    6) ClickOK.7) ClickOK again to close.8) Validate the workflow.9) Save the workflow.

    Step 7. Export the workflow and create a Plug-in.1) Export the workflow.2) Log into the Informatica Cloud training org.3) Go to the Configuration > Plug-ins page.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    58/90

    58 Informatica Cloud Enterprise Lab Guide

    4) Click the New button.5) EnterSXX_Mer geLeads (where XX is your student number) for the plug-in

    name.

    6) Select True for the Active option.7) Click the Browse button in the Mapplet XML file that you exported from

    PowerCenter.

    8) Save the plug-in.Step 8. Review data in Salesforce.

    1) Log into Salesforce to view the duplicate lead records before running the taskto merge them:

    Step 9. Create a task to use the plug-in.1) Create a data synchronization task to use the plug-in.

    2) On Step 2 of the wizard, make sure that in the connection used for the sourcefile, the Date Format is set to YYYY-MM-DDTHH:MM:SS.000z:

    3) Specify the following properties for the task:o Task Name: SXX_MergeLeadso Task Operation: Inserto Source Connection: Flat Fileo Source Object: SXX_FindDuplicateLeads_Duplicates.csvo Target Connection: SXX_Salesforceo Target Object: Merged_out.csv

    4) Add the plug-in, SXX_MergeLeads, on the Field Mapping page.

    5) Complete the field mapping.6) Validate the field mapping.7) Save and run the task.

    Step 10. Verify results.1) Check the target file to view a list of merged records.2) View the leads in Salesforce.

    Note that the record with the latest CreateDate is the master and the slave

    record has been purged automatically.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    59/90

    Informatica Cloud Enterprise Lab Guide 59

    Unit 8 Lab 1: Creating a Log-In Plug-in (Using CasualToken-Style Authentication)

    Business Scenario:

    You need to use the Salesforce.com API to perform an operation that is not available

    in Informatica Cloud, or in Power Exchange for Salesforce. In this lab, you will

    create a plug-in that logs into Salesforce.com and gets an authentication token. The

    plug-in must write this token to a file, so that it can be accessed by other plug-ins that

    need to access the Salesforce,com web services API.

    Lab Scenario:

    In this lab, you will create a plug-in that logs into Salesforce.com and gets an

    authentication token. The plug-in must write this token to a file, so that it can be

    accessed by other plug-ins that need to access the Salesforce,com web services API.

    Goals:

    Learn how to build a plug-in that calls a web service method. Learn how to use token-style authentication with Informatica Cloud plug-ins.

    Duration:

    This lab should take approximately 15 minutes.

    InstructionsStep 1. Review the Salesforce API documentation for Login.

    1) Go to the following URL to review the documentation for the login() webservice:ht t p: / / www. sal esf or ce. com/ us/ devel oper / docs/ api / Cont ent / sf or ce_api _cal l s_ l ogi n. ht m

    Step 2. Download the Salesforce Enterprise WSDL.1) Log into Salesforce.2) Go to Setup -> Develop -> API.3) Click on the Generate Enterprise WSDL link:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    60/90

    60 Informatica Cloud Enterprise Lab Guide

    4) Click the Generate button.5) Save the file to your computer.6) Rename the file to Sal esf or ceEnt er pr i se. wsdl .

    Step 3. Download the workflow xml and import into the RepositoryManager.

    1) Go to the Training web site.2) Navigate to the Workflow XML directory and download the following file:

    wf _Sal esFor ce_Logi n. xml3) Import the xml into your PowerCenter Repository Manager.

    Step 4. Download the source file and create the directory structure.1) Create a subdirectory called SFDCunderC: \ a_I OD\ Fi l es\ .2) Create the following subdirectories under SFDC:

    SrcTgtLkp

    3) Go to the Training web site, navigate to the Source Data Files directory, anddownload the following file:SFDC_Logi n. csv

    4) Place this file in the following directory:C: \ a_I OD\ Fi l es\ SFDC\ Sr c

    5) Edit the file and enter your Salesforce username, password, security token, andservice URL (necessary if connecting to a Sandbox org).

    6) Go to the Class Resources web site and navigate to the Target Files directory.7) Download the file, sfdc_session.csv, and save it to the Lkp directory.

    Step 5. Open and examine the mapplet.1) Open the PowerCenter Designer application.2) Open the mapplet, mplt_Salesforce_Login, in the Mapplet Designer tool.3) Delete the Web Services Consumer transformation.

    For practice, you will add this transformation back in the next step.

    Step 6. Add a Web Services Consumer transformation.1) Add a Web Services Consumer transformation to the mapplet.2) On the Import from File page, select the Local File option and select the file

    that you saved in the previous step.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    61/90

    Informatica Cloud Enterprise Lab Guide 61

    Note: If you are prompted to override all infinite lengths with a value, click

    Yes and enter the value 100.

    3) Select the login operation:

    4) ClickNext.5) On Step 2 of the wizard, be sure to select the Create URL Port option:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    62/90

    62 Informatica Cloud Enterprise Lab Guide

    6) ClickFinish.

    7) Double-click the Web Services Consumer transformation to open the propertiesdialog.

    8) Click on the Web Services ConsumerProperties tab.9) Click the Add Pass-through Port button.10)Add the following pass-through ports:

    11)ClickOK.12)Close the Properties dialog.13)Right-click in the header bar for the Web Services Consumer transformation

    and select WSDL Workspace -> Output mode.

    14)Right-click on the header of the XML object, X_n3_Envelope0 (you will needto scroll to the right in the XML Schema Navigator to find it) and select Add aReference Port.

    15)Select the Username and Password fields:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    63/90

    Informatica Cloud Enterprise Lab Guide 63

    16)ClickOK.17)Save changes.18)Close the XML Schema Navigator window.

    19)Map fields from the Expression transformation to the Web ServicesConsumer transformation as follows:

    20)Save your changes.21)Map fields from the Web Services Consumer tranformation to the Output

    transformation as follows:

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    64/90

    64 Informatica Cloud Enterprise Lab Guide

    22)Save the mapplet.Step 7. Validate and save the mapping.

    1) Open the mapping, m_SalesForce_Login in the Designer tool.2) Validate and save the mapping.

    Step 8. Validate and run the workflow.

    1) Open the workflow, wf_m_SalesForce_Login.2) Edit the workflow and edit the Source and Target file properties on the

    Mapping tab.3) Save your changes.4) Validate and run the workflow.5) Verify results by examining the output file that was created.

    Step 9. Export the workflow and create a Plug-in.1) Export the workflow.2) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.

    3) Go to the Configuration > Plug-ins page.4) Click the New button.5) EnterSXX_SFDC_Logi n (where XX is your student number) for the plug-in

    name.

    6) Select False for the Active option.7) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.

    Step 10. Create new Informatica Cloud flat file connections.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    65/90

    Informatica Cloud Enterprise Lab Guide 65

    1) Create a new flat file connection (name it SXX SFDC Source Fi l es) thatpoints to the directory where the Salesforce credentials file is stored

    (c:\a_IOD\Files\Salesforce\Src.

    2) Create a new flat file connection that points to the directory where theSalesforce sessionID file is stored (c:\a_IOD\Files\Salesforce\Lkp.

    Step 11. Create a data synchronization task.1) Create a data synchronization task.2) Name the taskSXX_SFDC_Logi n.3) Select Insert for the Operation.4) For the Source, select SXX SFDC Source Files for the Connection, and

    SFDC_Login.csv for the Object.5) For the Target, select SXX SFDC Lookup Files for the Connection, and

    sfdc_session.csv for the Object.6) On the Field Mapping page, add the plug-in, SXX_SFDC_Login, to

    the task.

    7) Map the Source to Plug-in fields as follows:

    8) Map the Plug-in to Target fields as follows:

    9) Save and run the task.10)Verify results by opening the file in the Lookup directory. This file should now

    contain a token. In the next lab, you will create a separate plug-in that will use

    this token to convert leads in Salesforce.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    66/90

    66 Informatica Cloud Enterprise Lab Guide

    Unit 7 Lab 2: Creating a Convert Leads Plug-in thatUses an Authentication Token

    Business Scenario:

    You have a file of leads that have come in from your external web site. Note that the

    leads have already been checked against Salesforce to ensure that they dont exist (as

    leads or contacts). Since the leads have already been checked, you want to add them

    and automatically convert them to an account and contact, so that have the original

    lead and conversion are part of the record history.

    Lab Scenario:

    In this lab, you will create a plug-in that uses the authentication token (Session ID)

    that you obtained via the plug-in the previous lab. The plug-in will use that token to

    call the convertLead() web service and convert leads.

    Goals: Learn how to build a plug-in that calls a web service method. Learn how to build a plug-in that uses a credential (token) that is stored in a file.

    Duration:

    This lab should take approximately 15 minutes.

    InstructionsStep 1. Review the Salesforce API documentation for convertLead().

    1) Go to the following URL to review the documentation for the convertLead()web service:

    ht t p: / / www. sal esf or ce. com/ us/ devel oper / docs/ api / Cont ent / sf or ce_api _cal l s_conver t l ead. ht m

    Step 2. Download the workflow xml and import into the RepositoryManager.

    1) Go to the Training web site.2) Navigate to the Workflow XML directory and download the following file:

    wf _m_Sal esf orce_Convert Lead. xml3) Import the xml into your PowerCenter Repository Manager.

    Step 3. Download the source file and create the directory structure.Note: In order to test and validate the PowerCenter workflow, you will need a

    source file.

    1) Go to the Class Resources web site, navigate to the Source Files directory,

    and download the following file:Conver t Leads. csv2) Place this file in the following directory:

    C: \ a_I OD\ Fi l es\ Sal esf or ce\ Sr c

    Step 4. Enter or locate leads to be converted.1) In your Salesforce org, enter one or more new leads (or find existing leads that

    have not yet been converted).2) Note the Salesforce ID for the lead(s).3) Open and edit the source file, ConvertLeads.csv.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    67/90

    Informatica Cloud Enterprise Lab Guide 67

    4) Replace the Lead ID with the Lead ID from your Salesforce instance.5) Verify that the value for the ConvertedStatus field exists in your org, and is

    the status you want the lead converted to:

    6) Save changes and close the file.Step 5. Open and examine the mapplet.

    1) Open the PowerCenter Designer application.2) Open the mapplet, mplt_SFDC_ConvertLead, in the Mapplet Designer tool.3) Open the Expression transformation.4) Note the Serial_Num field.5) What does the expression CUME(1) do?

    ___________________________________________________

    ___________________________________________________

    6) Open the Lookup transformation.7) Note the Lookup Condition.8) Note the SessionID field in the Lookup transformation and note which fields

    it is mapped to in the Web Services Consumer transformation:

    ___________________________________________________

    ___________________________________________________

    Step 6. Update the workflow properties.1) Edit the workflow in the Workflow Designer tool.2) Edit the Source and Target file properties on the Mapping tab.3) Select the Output Field Names option for the Target.4) Save your changes.

    Step 7. Run the workflow and verify results.1) Run the workflow.2) Using the Workflow Monitor, verify that the task succeeded.3) In Salesforce, locate (one of) the lead(s) that you added to the source file.4) Verify that the lead has been converted to an account and opportunity.

    Step 8. Export the workflow.1) From the Repository Manager, export the workflow.2) Save the xml file to your desktop.

    Step 9. Create a plug-in in Informatica Cloud.1) Log into the Informatica Cloud training org, using the username and password

    that were provided to you.

    2) Go to the Configuration > Plug-ins page.3) Click the New button.

  • 7/28/2019 InformaticaCloudEnterpriseLabs11-2011

    68/90

    68 Informatica Cloud Enterprise Lab Guide

    4) EnterSXX_SFDC_Convert Lead (where XX is your student number) for theplug-in name.

    5) Select False for the Active option.6) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.

    7) ClickOK to save the plug-in.

    Step 10. Create a new Informatica Cloud flat file connection.1) Create a new flat file connection (name it SXX SFDC Target Files) that points

    to the target directory (c:\a_IOD\Files\Salesforce\Tgt).

    2) From the training web site, click on the Target Files link, and download thefile, tgt_SFDC_ConvertLead_out.csv.

    3) Save it to the directory you just created.Step 11. Create a data synchronization task.

    1) Create a data synchronization task.2) Name the taskSXX_SFDC_Conver t Lead.3) Select Insert for the Operation.4) For the Source, select SXX SFDC Source Files for the Connec