infa cloud enterprise labs - sum12

Upload: sumit0428

Post on 03-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    1/84

    Informatica Cloud Enterprise Lab Guide 1

    Informatica

    Cloud EnterpriseTraining Class

    Student Lab GuideVersion ICS 2012-10

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    2/84

    2 Informatica Cloud Enterprise Lab Guide

    Informat ica Cloud Ent erprise T raining Class - Student Lab Guide

    Version 2.0

    No 2011

    Copyright (c) 1998-2011 Informatica Corporation.

    All rights reserved. Prin ted in the USA.

    This software and documentat ion contain proprietary information of Informatica Corporation and are prov ided under a license

    agreement cont aining restrict ions on use and disclosure and are also protected by copyright law. Reverse engineering of the softwareis proh ibited. No part of t his document may be reproduced or transmitt ed in any form, by any means (electronic, photocopying,

    recording or otherwise) without pr ior consent of In formatica Corporation.

    Use, duplicat ion, or disclosure of t he Soft ware by the U.S. Government is subject t o the restrict ions 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 repor t

    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 t rademarks or registered trademarks of Informatica

    Corporation in the United Stat es and in jurisdictions throughout t he world. All other company and product names may be t rade names

    or t rademarks of their respective owners.

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

    Informat ica 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.

    Port ions of this software cont ain copyrighted material from The JBoss Group, LLC. Your right to use such materials is set fo rth in the

    GNU Lesser General P ublic License Agreement, which may be found at htt p://www.opensource.org/licenses/lgpl-license.php. The

    JBoss materials are provided free of charge by Informat ica, as-is, witho ut warranty of any kind,either express or implied, includingbut not limit ed to t he implied warrant ies of merchantability and fitness for a particular purpose.

    Port ions of this software cont ain copyrighted mat erial from Meta Integration Technology, Inc. Meta Integration is a r egistered

    trademark of Met a Int egration Technology, Inc.

    This product includes soft ware developed by t he Apache Software Foundation (ht tp ://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 Pro ject for use in the OpenSSL T oolkit and redistribution of t his softwareis subject to t erms available at htt p://www.openssl.org. Copyright 1998 -2003 The OpenSSL Project. All Rights Reserved.

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

    The Curl license provided with th is Soft ware is Copyright 1996 -200, Daniel Stenberg, . All Rights Reserved.

    The PCRE library included with th is soft ware is Copyright (c) 1997-2001 University of Cambridge Regular expression suppor t is

    prov ided by the PCRE library package, which is open source soft ware, writ ten by Philip Hazel. The source for this library may be

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

    InstallAnywhere is Copyr ight 2005 Zero G Soft ware, Inc. All Rights Reserved.

    Port ions of the Soft ware are Copyright (c) 1998 -2005 The OpenLDAP Foundation. All rights reserved. Redistribution and use insource 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 Soft ware is prot ected 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: Info rmat ica Corporation pro vides this document ation as is witho ut warranty o f any k ind, either express or implied, including, but not limited to, the implied warranties of non -infringement, merchantability, or use for a particular purpose. T heinformat ion provided in t his documentat ion may include t echnical inaccuracies or t ypographical errors. Informatica could makeimprovements and/or changes in the products described in this documentat ion at any t ime without notice.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    3/84

    Informatica Cloud Enterprise Lab Guide 3

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

    Module 2 Lab 2: Using a Plug-in in a DSS Task .............................................. ....................... ... 14Module 2 Lab 3: Modifying a Plug-in...................... ....................... ........................ ................... 16Module 2 Lab 4: Importing and Running a Workflow as a PowerCenter Service Task ............... 18Module 4 Lab 1: Create a PowerCenter Service that Converts a Fixe d-Width File to a Flat File . 20Module 4 Lab 2: Converting from XML to Flat File ................................ ........................ .......... 28Module 4 Lab 3: Using the PowerCenter Service Task in a Task Flow............. ...................... .... 34Module 5 Lab 1: Modifying the Aggregator Plug-in ......................... ...................... ................... 35Module 5 Lab 2: Creating a Plug-in that De-dupes Source Records........................... ................. 40Module 5 Lab 3 (BONUS): Making the Plug-in that De-dupes Source Records Case-Insensitive44 Module 6 Lab 1: Calling a Twitter Method via the REST API ................. ....................... ........... 45Module 7 Lab 1: Calling a SOAP Style Web Service via RPC .......................... ....................... .. 49Module 7 Lab 2: Creating a Log-In Plug-in (Using Casual Token-Style Authentication) ............ 54 Module 7 Lab 3: Creating a Convert Leads Plug-in that Uses an Authentication Token.............. 60 Module 7 Lab 4: Creating a Log-Out Plug-in (Using Casual Token-Style Authentication) ......... 63Module 9 Lab 1: Creating a Plug-in that calls the Informatica Cloud REST API (login resource) ................................................................................................................................................. 65Module 9 Lab 2: Creating a Plug-in that calls the Informatica Cloud REST API (activityLog) ... 70Module 9 BONUS Lab: Using the Informatica Cloud REST API to Create Real-Time Integration ................................................................................................................................................. 75Module 10 - Workshop: Bringing it All Together ............................. ....................... .................. 78Appendix AHow to Reset Security Token and Create a Salesforce Connection ...................... 80Appendix BCreating an External ID field in Salesforce ......................... ....................... .......... 82Appendix CCreating a Pass-Through Port in the Web Services Consumer Transformation..... 84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    4/84

    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 theTraining 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:

    ____________________________________

    http://ec2-75-101-208-253.compute-1.amazonaws.com/TrainingHelp/Main2.aspxhttp://ec2-75-101-208-253.compute-1.amazonaws.com/TrainingHelp/Main2.aspxhttp://ec2-75-101-208-253.compute-1.amazonaws.com/TrainingHelp/Main2.aspx
  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    5/84

    Informatica Cloud Enterprise Lab Guide 5

    Module 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 withyour 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 your

    local 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 FileswhereXX is your student number).

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

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    6/84

    6 Informatica Cloud Enterprise Lab Guide

    Module 1 Lab 1: Export an Informatica Cloud Taskand Import into PowerCenter

    Business Scenario:

    A business user (you or someone else) has created a task in Informatica Cloud. Youwould 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 CompetencyCenter).

    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 Cloudand 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.

    Instructions

    Step 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: Account

    o Target Connection: SXX_Salesforce

    o Target Object: Account3) Map the following fields:

    Source Field Target Field

    Account_name Name

    Area_code & Phone_number Phone

    AccountId Account_External_ID__c (or

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    7/84

    Informatica Cloud Enterprise Lab Guide 7

    other field with external IDproperty)

    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 web

    site 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 XMLicon 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) Click OK.6) Click Nextto begin the import.

    7) Click the Add All button to import all workflow objects:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    8/84

    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. ALWAYS

    click the Add Allbutton.

    8) Click Next.9) Click in the Destination folderfield to select the folder you created for this

    class.10)Select the folder and click OK:

    11)Contiue to click Nextto import workflow objects.

    12)For any conflict resolutions found, select the Reuseoption:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    9/84

    Informatica Cloud Enterprise Lab Guide 9

    13)Finish the import.

    Step 5. Examine the mapping.1) Open the PowerCenter Designerapplication.2) Open the Mapping Designertool.

    3) Open the Mappings folder and locate the mapping that was imported (it willbe named something like m_dss_xxxx, where xxxx is the task number inInformatica 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 thephone 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.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    10/84

    10 Informatica Cloud Enterprise Lab Guide

    Module 2 Lab 1: Create and Export a Plug-in for Usein Informatica Cloud

    Business Scenario:

    You must create a plug-in that will take a number of source rows (by AccountID) andformat 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 examplesyou will create in this class.

    1) Go to the Trainingweb site. (http://ec2-75-101-208-253.compute-1.amazonaws.com/TrainingHelp/Main2.aspx)

    2) Navigate to the Workflow XMLdirectory and download the following file:wf_PickListPivot.xml

    3) 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 labclick the Add Allbutton 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_IOD\Files\2) Create a subdirectory called PickListPivot.

    3) Create the following subdirectories under PicklistPivot:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    11/84

    Informatica Cloud Enterprise Lab Guide 11

    SrcTgt

    4) Go to the Trainingweb site, navigate to the Source Data Files directory, anddownload the following file:

    Customer_Certifications.csv5) Place this file in the following directory:

    C:\a_IOD\Files\PicklistPivot\SrcStep 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 Aggregatortransformation.

    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 Cloud

    DSS 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 PowerCenter Workflow Managerapplication.

    2) Open the workflow, wf_PickList_Pivot, in the Workflow Designertool.3) Edit the session task.

    4) On the Mapping tab, click on the source and enter the following value forsource file directory:

    C:\a_IOD\files\PickListPivot\Src5) Enter the following value for source filename :

    Customer_certifications.csv

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    12/84

    12 Informatica Cloud Enterprise Lab Guide

    6) Click on the target and enter the following value for output file directory:C:\a_IOD\files\PickListPivot\Tgt

    7) Enter the following value for output filename:Picklistpivot.out

    8) For the Header Optionsattribute, 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:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    13/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    14/84

    14 Informatica Cloud Enterprise Lab Guide

    Module 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.

    Instructions

    Step 1. Create the picklist field (custom field) in Salesforce.1) Create a custom field of type multi-select picklist on the Account object in your

    Salesforce org.

    2) Name the picklist field Certifications.3) Be sure to add the field to your page layout(s).

    Step 2. Examine the source data.1) Go to the Class Resourcesweb site.

    2) Click on the DB Accounts link to view the contents of the Accounts table.3) Click on the DB Certificationslink 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-se lect picklist in Salesforce.

    2) Specify the following properties for the task:o Task Name : SXX_LoadPickList

    o Task Operation: Upsert

    o Source Connection: Lab SQLServero Source Object: Certifications

    o 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 Field

    Source to Plug-in AccountId KEY

    Certification ITEM

    Plug-in to Target ITEM_LIST_SEMICOLAN Certifications__c

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    15/84

    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?

    ___________________________________________________

    ___________________________________________________

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    16/84

    16 Informatica Cloud Enterprise Lab Guide

    Module 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 sorted

    before they are aggregated. This can be accomplished by adding a sortertransformation 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 approximate ly 15 minutes.

    Instructions

    Step 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 theAggregator 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 (Portstab):

    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:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    17/84

    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 passwordthat 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) Click OKto 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 previous

    lab).2) Verify your results in Salesforce.

    3) Examine the following account: Tyco, and compare to the notes you took inLab 2, above.

    4) Compare to the Certifications table.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    18/84

    18 Informatica Cloud Enterprise Lab Guide

    Module 2 Lab 4: Importing and Running a Workflowas a PowerCenter Service Task

    Business Scenario:

    In some cases, you will need to upload and run the workflow XML as a PowerCenterService task, rather than as a plug-in.

    Lab Scenario:

    In this lab, you will import the XML into Informatica Cloud as a PowerCenter

    Service task, rather than a plug-in. Note that when you run a PowerCenterworkflow 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 thedirectory 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 approximate ly 10 minutes.

    Instructions

    Step 1. Make a copy of the XML file and rename.1) Copy the workflow XML file that you exported from PowerCenter, in the

    previous lab (it should be located on your desktop).2) Rename the file for example, add _pcs to the filename:

    wf_PickList_Pivotv2_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 >PowerCenterServicepage.

    3) Click the Newbutton.4) Enter the following details for the task:

    o Task Name : SXX_PickListP ivoto Secure Age nt: 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) Click OK.

    6) Click Save 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 on

    a different machine as PowerCenter.1) Create the following directory structure on the secure agent machine:

    C:\a_IOD\Files\PicklistPivot2) Create the following sub-directories:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    19/84

    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 Srcdirectory.

    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 Tgtdirectory you created above, and verify results by opening

    the picklistpivottarget.out file.6) The results should look something like this:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    20/84

    20 Informatica Cloud Enterprise Lab Guide

    Module 4 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 contentsof the file into Salesforce as leads.

    Lab Scenario:

    In this lab, you will create a PowerCenter service that converts a fixed-width

    format file to a flat file, so the file can be used as the source in an InformaticaCloud 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 andload 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 approximate ly 20 minutes.

    Instructions

    Step 1. Download the fixed-width file.1) Create a new subdirectory under c:\a_IOD\Files called FixedFormat.

    2) Create a Srcsubdirectory.3) Go to the Trainingweb site and navigate to the Source Files directory.

    4) Download the file, Student_Lead.txt.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:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    21/84

    Informatica Cloud Enterprise Lab Guide 21

    The Flat File Import Wizard is launched.

    4) SelectFixed Width and click the Nextbutton.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 City8 144 - 145 State

    9 146 - 154 Zip Code

    10 155 - 166 Phone

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

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    22/84

    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 Finishbutton when you are finished.

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

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    23/84

    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 Designertool.

    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 field

    contains a comma:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    24/84

    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 Target

    Definition 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 Generationwizard is launched.

    2) Select the Workflows with a reusable sessionoption:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    25/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    26/84

    26 Informatica Cloud Enterprise Lab Guide

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

    7) Click OK.

    8) Save changes.

    Step 7. Update the workflow properties.1) Edit the workflow in the Workflow Designertool.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.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    27/84

    Informatica Cloud Enterprise Lab Guide 27

    2) Import the workflow as a PowerCenter Service in Informatica Clouduse the naming convention,SXX_FixedFormattoFF.

    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 task SXX_FixedWidthInsertLeads.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 Servicetask) is stored.

    4) Create a task flow that includes the PowerCenter Service and the datasynchronization task.

    5) Name the task flowSXX_FixedWidthLeads.

    6) Run the task flow and verify results in Salesforce.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    28/84

    28 Informatica Cloud Enterprise Lab Guide

    Module 4 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 inan Informatica Cloud task. You will then create two data synchronization tasks onethat 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, CustomersContacts_Sample.xml and save it to a

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

    folder in the a_IOD\Files directory called ParseXML).

    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:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    29/84

    Informatica Cloud Enterprise Lab Guide 29

    4) Before you click Open, click the Advanced Optionslink (at the bottom of the

    dialog box).The Change XMLViews Creation and Naming Options dialog is displayed.

    5) Select the first checkbox and enter 100 in the value field:

    6) Click OK.7) Click Opento import the file.

    The XML Wizard is displayed.8) Click Next, 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, youmust 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 forpurposes of this lab, you will use flat files that have already been created.

    1) Go to the Trainingweb site and navigate to the Target Filesdirectory.

    2) Download the following files:

    Companies.csv

    Contacts.csv3) Save both files to the a_IOD\Files\Parse XML\ Tgtfolder.

    Step 4. Use the Target Designer tool to create target definitions.1) In PowerCenter Designer, go to the Target Designertool.

    2) Select Import from File from the Targets menu.3) Locate the first file you downloaded in the previous step and select it:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    30/84

    30 Informatica Cloud Enterprise Lab Guide

    4) Click OK.

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

    and click Next:

    7) Click Nextagain.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    31/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    32/84

    32 Informatica Cloud Enterprise Lab Guide

    9) Click Next, 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 youcreated 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_Customerobject 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 youcreated previously to add it to the mapping.

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

    it to the mapping.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    33/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    34/84

    34 Informatica Cloud Enterprise Lab Guide

    Module 4 Lab 3: Using the PowerCenter Service Taskin a Task Flow

    Lab Scenario:

    Now that you have two PowerCenter Service tasks that convert the XML file intocorresponding 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 tasksthat 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 Service

    task 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 approximate ly 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 task SXX_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 task SXX_XMLUpsertContacts.Step 3. Create a Task Flow that contains all tasks.

    1) Create a task flow.

    2) Name the task flowSXX_XMLAccountsContacts.

    3) Add both PowerCenter Service tasks.4) Select the Stop on Erroroption.

    5) Add the two data synchronization tasks you created, above.6) Select the Stop on Erroroption 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.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    35/84

    Informatica Cloud Enterprise Lab Guide 35

    Module 5 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 workspecifically 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.

    Instructions

    Step 1. Examine the source data.1) Go to the Trainingweb 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 orderID, 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 thetotals 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-inlink.

    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_inport:

    http://www.informatica.com/http://www.informatica.com/http://www.informatica.com/http://www.informatica.com/
  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    36/84

    36 Informatica Cloud Enterprise Lab Guide

    6) Drag the new OrderType port from the Input transformation to the Expression

    transformation, and from the Expression transformation to the Sortertransformation.

    7) Drag the OrderType port from the Sorter transformation to the Aggregator

    transformation.8) Open the Aggregatortransformation.

    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(OrderType='Direct', IN_AGG_FIELD1,0)IIF(OrderType='Web', IN_AGG_FIELD1,0)

    10)You will also need to add two ports for summing orders of each type.

    The completed Aggregatortransformation should contain the following ports:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    37/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    38/84

    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 Manager

    tool.

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

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

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

    Step 7. Export the workflow.1) Export the workflow

    2) 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 Newbutton.

    4) Enter SXX_Aggregator (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) Click OKto 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_SumOrderTotals

    o Task Operation: Upserto Source Connection: Lab SQL Server

    o Source Object: Orders

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    39/84

    Informatica Cloud Enterprise Lab Guide 39

    o Target Connection: SXX_Salesforce

    o Target Object: Account3) Add the plug-in, SXX_Aggregator, on the Field Mappingpage.

    4) Select the Source to Plug-inmapping.5) Map the following fields:

    Source Plug-in

    AccountId AccountID_inOrderTotal OrderTotal_in

    OrderType OrderType

    1) Select the Plug-in to Targetmapping.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 correct

    values.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    40/84

    40 Informatica Cloud Enterprise Lab Guide

    Module 5 Lab 2: Creating a Plug-in that De-dupesSource Records

    Business Scenario:

    You regularly receive lead lists from trade shows and other events that containduplicate data. Before loading these leads into Salesforce, your business users

    would like to remove the duplicate records, so that only unique records areloaded 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 formatching 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 approximate ly 30 minutes

    Instructions

    Step 1. Examine the source file1) Before you modify the workflow in PowerCenter, you may wish to review an

    example source file to get a sense of the fields and data.2) Go to the Trainingweb 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 Trainingweb site.

    2) Navigate to the Workflow XMLdirectory.

    3) Right-click to download the wf_m_DedupeSourceRecords_3Fields.XMLfile.

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

    Step 3. Edit the mapplet.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    41/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    42/84

    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 under c:\a_IOD\Files called De-

    DupeLeads.

    2) Create a Srcsubdirectory.

    3) Create a Tgtsubdirectory.

    4) Go to the Trainingweb 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 Newbutton.

    5) Enter SXX_RemoveDupes (where XX is your student number) for the plug-

    in name.

    6) Select True for the Active option.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    43/84

    Informatica Cloud Enterprise Lab Guide 43

    7) Click the Browse button in the Mapplet XML file field to locate the xml file

    you 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_Salesforce

    o Target Object: Lead2) Add the plug-in, SXX_RemoveDupes , on the Field Mappingpage.

    3) Select the Source to Plug-inmapping.

    4) Map all of the lead fields to their corresponding input fields in the plug-in, plusbe 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 Targetmapping.

    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?

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    44/84

    44 Informatica Cloud Enterprise Lab Guide

    Module 5 Lab 3 (BONUS): Making the Plug-in thatDe-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 approximate ly 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) inthe Informatica Cloud task. Which approach do you think would be better and why?

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

    ________________________________________________________________________

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    45/84

    Informatica Cloud Enterprise Lab Guide 45

    Module 6 Lab 1: Calling a Twitter Method via theREST API

    Business Scenario:

    You are using an Informatica Cloud plug-in to pull Tweets that match specificsearch 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 tweetsin 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 thatmatch 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 approximate ly 30 minutes.

    Instructions

    Step 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 Searchplug-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 XMLdirectory.

    2) Download the file, wf_m_Twitter_Search_Simple.XML.3) Import the workflow into your PowerCenter repository.

    Step 3. Download the source file.1) Create a new folder in the a_IOD\Files directory called Twitter.

    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:http://dev.twitter.com/doc/get/search As 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 a

    separate browser tab:

    http://dev.twitter.com/doc/get/searchhttp://dev.twitter.com/doc/get/search
  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    46/84

    46 Informatica Cloud Enterprise Lab Guide

    http://search.twitter.com/search.atom?q=informatica

    Note that Informatica supports the atom XML format, and does not support thejson 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 the

    URL:http://search.twitter.com/search.atom?q=informatica&lang=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:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    47/84

    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_idport what do you think this expressiondoes?

    _____________________________________________________________

    _____________________________________________________________

    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 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 Newbutton.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    48/84

    48 Informatica Cloud Enterprise Lab Guide

    4) Enter SXX-TwitterSearch (where XXis 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) Click OKto 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 objectin 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_TwitterSearch

    o Task Operation: Upserto Source Connection: LabFiles

    o Source Object: searchCriteria.csvo Target Connection: SXX_Salesforce

    o Target Object: Case3) Add the plug-in, SXX_TwitterSearch, on the Field Mappingpage.

    4) Select the Source to Plug-inmapping.

    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 Targetmapping.

    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 NewOrigin 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.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    49/84

    Informatica Cloud Enterprise Lab Guide 49

    Module 7 Lab 1: Calling a SOAP Style Web Servicevia RPC

    Business Scenario:

    You have Account data in a SaaS application (outside of Salesforce). You canread 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 modifiedsince 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 upsertaccounts 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 approximate ly 30 minutes.

    Instructions

    Step 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 Consumertransformation to the mapplet.2) On the Import from File page, select the URLoption.

    3) To get the URL for the WSDL, go back to the Trainingweb site, right-clickon the Orders Web Service WSDL link, and select Copy Shortcut.

    4) Paste the URL in the Addressfield:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    50/84

    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) Click Open.6) Scroll to the top of the operation tree and select the getRecentAccounts

    operation:

    7) Click Next.

    8) Click Finish.

    9) Map the LastModifiedDate port on the Mapplet Input transformation to thetns_LastModifiedDate port on the WebServices Consumertransformation:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    51/84

    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 tothe Output transformation:

    3) Save the mapplet.

    Step 4. Download the source file.1) Create a new subdirectory under c:\a_IOD\Files called

    GetRecentAccounts.

    2) Create a Srcsubdirectory.

    3) Create a Tgtsubdirectory.

    4) Go to the Trainingweb 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 Trainingweb site and navigate to the Target Filesdirectory.

    9) Download the file, account_list.csv.10)Save it to the Tgtdirectory 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

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    52/84

    52 Informatica Cloud Enterprise Lab Guide

    Account_List.xml

    2) 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 Targetfile 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 Newbutton.

    5) Enter SXX_GetRecentAccounts (where XX is your student number) forthe 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 fileyou previously saved to your desktop.

    8) Click OKto 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: Upsert

    o Source Connection: Flat File connection that containsDate_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-inmapping.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    53/84

    Informatica Cloud Enterprise Lab Guide 53

    5) Map the LastModifiedDate field from the Source to the plug-in.

    6) Select the plug-in to Targetmapping.7) Map the following fields:

    Plug-in Target: Account Expression

    AccountId Account_External_ID__c

    billingStreet BillingStreet

    billingCity BillingCitybillingCountry 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.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    54/84

    54 Informatica Cloud Enterprise Lab Guide

    Module 7 Lab 2: Creating a Log-In Plug-in (UsingCasual Token-Style Authentication)

    Business Scenario:

    You need to use the Salesforce.com API to perform an operation that is not availablein 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. Theplug-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 anauthentication 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.

    Instructions

    Step 1. Review the Salesforce API documentation for Login.1) Go to the following URL to review the documentation for the login() web

    service:

    http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_login.htm

    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:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    55/84

    Informatica Cloud Enterprise Lab Guide 55

    4) Click the Generate button.

    5) Save the file to your computer.

    6) Rename the file to SalesforceEnterprise.wsdl.

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

    1) Go to the Trainingweb site.

    2) Navigate to the Workflow XMLdirectory and download the following file:wf_SalesForce_Login.xml

    3) Import the xml into your PowerCenter Repository Manager.

    Step 4. Download the source file and create the directory structure.1) Create a subdirectory called SFDCunder C:\a_IOD\Files\.

    2) Create the following subdirectories under SFDC:

    SrcTgt

    Lkp3) Go to the Trainingweb site, navigate to the Source Data Files directory, and

    download the following file:

    SFDC_Login.csv4) Place this file in the following directory:

    C:\a_IOD\Files\SFDC\Src5) Edit the file and enter your Salesforce username, password, security token, and

    service URL (necessary if connecting to a Sandbox org).6) Go to the Class Resourcesweb site and navigate to the Target Filesdirectory.

    7) Download the file, sfdc_session.csv, and save it to the Lkpdirectory.

    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 Consumertransformation to the mapplet.

    2) On the Import from File page, select the Local File option and select the filethat you saved in the previous step.

    Note: If you are prompted to override all infinite lengths with a value, clickYes and enter the value 100.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    56/84

    56 Informatica Cloud Enterprise Lab Guide

    3) Select the loginoperation:

    4) Click Next.

    5) On Step 2of the wizard, be sure to select the Create URL Portoption:

    6) Click Finish.

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

    dialog.

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

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    57/84

    Informatica Cloud Enterprise Lab Guide 57

    11)Click OK.

    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 need

    to scroll to the right in the XML Schema Navigator to find it) and select Add a

    Reference Port.15)Select the Username and Password fields:

    16)Click OK.17)Save changes.

    18)Close the XML Schema Navigatorwindow.19)Map fields from the Expressiontransformation to the Web Services

    Consumertransformation as follows:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    58/84

    58 Informatica Cloud Enterprise Lab Guide

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

    transformation as follows:

    22)Save the mapplet.

    Step 7. Validate and save the mapping.1) Open the mapping, m_SalesForce_Loginin 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 Targetfile properties on the

    Mapping tab.3) Save your changes.

    4) Validate and run the workflow.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    59/84

    Informatica Cloud Enterprise Lab Guide 59

    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 Newbutton.

    5) Enter SXX_SFDC_Login (where XX is your student number) for the plug-in

    name.6) Select False for the Activeoption.

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

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

    points 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 the

    Salesforce 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 task SXX_SFDC_Login.3) Select Insertfor the Operation.4) For the Source, select SXX SFDC Source Filesfor the Connection, and

    SFDC_Login.csvfor the Object.

    5) For the Target, select SXX SFDC Lookup Filesfor the Connection, andsfdc_session.csvfor the Object.

    6) On the Field Mappingpage, add the plug-in, SXX_SFDC_Login, tothe task.

    7) Map the Source to Plug-infields as follows:

    8) Map the Plug-in to Targetfields as follows:

    9) Save and run the task.

    10)Verify results by opening the file in the Lookup directory. This file should nowcontain a token. In the next lab, you will create a separate plug-in that will use

    this token to convert leads in Salesforce.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    60/84

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    61/84

    Informatica Cloud Enterprise Lab Guide 61

    4) Replace the Lead ID with the Lead ID from your Salesforce instance.5) Verify that the value for the ConvertedStatusfield 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 Expressiontransformation.4) Note the Serial_Num field.

    5) What does the expression CUME(1)do?

    ___________________________________________________

    ___________________________________________________

    6) Open the Lookuptransformation.7) Note the Lookup Condition.

    8) Note the SessionID field in the Lookup transformation and note which fieldsit is mapped to in the Web Services Consumer transformation:

    ___________________________________________________

    ___________________________________________________

    Step 6. Update the workflow properties.1) Edit the workflow in the Workflow Designertool.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 Newbutton.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    62/84

    62 Informatica Cloud Enterprise Lab Guide

    4) Enter SXX_SFDC_ConvertLead (where XX is your student number) for the

    plug-in name.5) Select False for the Activeoption.

    6) Click the Browse button in the Mapplet XML file field to locate the xml file

    you previously saved to your desktop.7) Click OKto 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 the

    file, 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 task SXX_SFDC_ConvertLead.

    3) Select Insertfor the Operation.4) For the Source, select SXX SFDC Source Filesfor the Connection, and

    ConvertLeads.csvfor the Object.5) For the Target, select SXX SFDC Target Files for the Connection, and

    tgt_SFDC_ConvertLead_out.csvfor the Object.6) On the Field Mappingpage, add the plug-in,

    SXX_SFDC_ConvertLeads, to the task.7) Map the Source to Plug-infields as follows:

    8) Map the Plug-in to Targetfields as follows:

    9) Save the task.

    10)Before running the task, be sure to update the source file, ConvertLeads.csv

    with one or more leads (from your Salesforce org) to be converted.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    63/84

    Informatica Cloud Enterprise Lab Guide 63

    11)Run the SXX_SFDC_Login task first, to obtain a session token.

    12)Run the task.13)Verify results by looking for the lead(s) that you converted in Salesforce

    ensure that the lead was successfully converted to an account and contact.

    Module 7 Lab 4: Creating a Log-Out Plug-in (UsingCasual Token-Style Authentication)

    Business Scenario:

    You have a file of leads that have come in from your external web site. Note that theleads have already been checked against Salesforce to ensure that they dont exist (asleads 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 originallead and conversion are part of the record history.

    Lab Scenario:

    In this lab, you will create a plug-in that logs out of Salesforce.com therebyreleasing the session token that was obtained using the Login plug-in.

    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.

    Instructions

    Step 1. Review the Salesforce API documentation for Logout.1) Go to the following URL to review the documentation for the logout() webservice:

    http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_logout.htm

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

    1) Go to the Trainingweb site.

    2) Navigate to the Workflow XMLdirectory and download the following file:

    wf_SFDCLogout.xml3) Import the xml into your PowerCenter Repository Manager.

    Step 3. Download the lookup target file.

    1) Go to the Class Resourcesweb site and navigate to the Target Filesdirectory.2) Download the file, SFDC_Logout_Message.csv, and save it to the

    c:\a_IOD\Files\Salesforce\Tgtdirectory.

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

    Step 5. Export the workflow and create a Plug-in.1) Export the workflow.

    http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_logout.htmhttp://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_logout.htmhttp://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_logout.htmhttp://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_logout.htm
  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    64/84

    64 Informatica Cloud Enterprise Lab Guide

    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 Newbutton.

    5) Enter SXX_SFDC_Logout (where XX is your student number) for the plug-

    in name.

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

    you previously saved to your desktop.

    Step 6. Create a data synchronization task.1) Create a data synchronization task.2) Name the task SXX_SFDC_Logout.3) Select Insertfor the Operation.4) For the Source, select SXX SFDC Lookup Fil esfor the Connection,

    and Salesforce_Session.csvfor the Object.5) For the Target, select SXX SFDC Target Filesfor the Connection, and

    sfdc_logout_message.csvfor the Object.

    6) On the Field Mappingpage, add the plug-in, SXX_SFDC_Logout, tothe task.

    7) Map the Source to Plug-infields as follows:

    8) Map the Plug-in to Targetfields as follows:

    9) Save and run the task.10)Verify results by opening the file in the Tgtdirectory.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    65/84

    Informatica Cloud Enterprise Lab Guide 65

    Step 7. Create task flow.1) Add all three tasks to a task flow.

    2) Create/edit lead(s) in Salesforce and note SF ID(s).3) Update the source file.

    4) Run the task flow.5) Verify results.

    Module 9 Lab 1: Creating a Plug-in that calls theInformatica Cloud REST API (login resource)

    Business Scenario:

    On a regular basis, you need to take entries from the Informatica Cloud Activity Logand move them to a database for back-end monitoring and reporting by your IT

    department.

    Lab Scenario:

    In this lab, you will create a plug-in that logs into the Informatica Cloud REST APIand gets a SessionID. In the next lab, you will create a plug-in that that uses that

    SessionID to access the Informatica Cloud Activity Log.

    Goals:

    Practice calling the Informatica Cloud REST API from a plug-in.

    Practice using casual token-style authentication via a REST API interface.

    Duration:

    This lab should take approximately 30 minutes.

    Instructions

    Step 1. Review the Informatica Cloud REST API documentation.1) Open the Informatica Cloud online help.

    2) In the Table of Contents , click on the Informatica Cloud REST APIlink.

    3) Click on the loginlink.4) Review the documentation for the resource.

    5) List the two required parameters:

    ________________________________________________________

    ________________________________________________________

    6) List the format options for the response:

    ______________________________________________Step 2. Save the response in an xml file.

    1) Copy the sample response from the documentation:NO_ERRORijJepc5K+IIntsaNVBkGiMCDl3QBr8ruap4grRToHnyhzim

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    66/84

    66 Informatica Cloud Enterprise Lab Guide

    2PkuP7qRX2iY1gHMY

    2) Paste it into a text editor.

    3) Save the file (using a .xml extension).Step 3. Download the workflow xml and import into the Repository

    Manager.

    1) Go to the Trainingweb site.2) Navigate to the Workflow XMLdirectory and download the following file:

    wf_ICS_API_Logon.xml3) Import the xml into your PowerCenter Repository Manager.

    Step 4. Download the credentials source file.1) Create a new subdirectory under c:\a_IOD\Files called ICS_API.

    2) Create a Srcsubdirectory.

    3) Go to the Trainingweb site and navigate to the Source Files directory.

    4) Download the file, Src_ICS_User_Cred.csv.

    5) Save it to the directory you created.

    6) Edit the file and enter your Informatica Cloud username and password.7) Save and close the file.

    Step 5. Download the target file.1) Create a new subdirectory under c:\a_IOD\Files\ ICS_API called Tgt.

    2) Go to the Trainingweb site and navigate to the Target Filesdirectory.

    3) Download the file, Tgt_ICS_API_Create_SessionID.csv, and save it to thisdirectory.

    Step 6. Open and examine the mapplet.1) Open the mapplet, mplt_ICS_API_Login in the Designer tool.2) Open the Expression transformation.

    3) Note the expression for the Credentials port:

    ________________________________________________________

    ________________________________________________________What does this expression do?

    ________________________________________________________

    ________________________________________________________4) Open the HTTP transformation.

    5) Examine the settings on the HTTPtab.

    6) Delete the XML Parser transformation you will add it back to the mapplet,for practice.

    Step 7. Add an XML Parser transformation.1) Add an XML Parsertransformation.

    The Import XML Definitionscreen is displayed.2) Select the file you saved in Step 2, above:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    67/84

    Informatica Cloud Enterprise Lab Guide 67

    3) Choose the option to override all infinite field lengths , and enter the value

    100.4) Select Entity Relationships on the XML Definition Creation Options page

    and click Finish.5) Double-click on the XML Parsertransformation to edit the properties.

    6) Click on the Midstream XML Parsertab (you will need to click the rightarrow button in the top, right corner of the dialog box to view more tabs).

    7) Click the XML Editor button.

    8) Click on the column name (on the right-hand side of the screen), and enter anew value for the length property (enter 255 for each field in the Login

    Response):

    9) Save your changes.

    10)Map fields from the HTTP transformation to the XML Parsertransformationas follows:

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    68/84

    68 Informatica Cloud Enterprise Lab Guide

    11)Map fields from the XML Parser transformation to the Expressiontransformation as follows:

    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 Newbutton.

    5) Enter SXX_ICS_API_Login (where XX is your student number).

    6) Select False for the Activeoption.

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

    8) Click OKto save the plug-in.

    Step 10. Create new Informatica Cloud flat file connections.

    1) Create a new flat file connection (name it SXX ICS API Source Files)that points to the directory where the Informatica Cloud credentials file is

    stored (c:\a_IOD\Files\ICS_API\Src.

    2) Create a new flat file connection (name it SXX ICS API Lookup Files)that points to the directory where the Informatica Cloud sessionID file is stored

    (c:\a_IOD\Files\ICS_API\Lkp.

    Step 11. Create a data synchronization task.1) Create a data synchronization task.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    69/84

    Informatica Cloud Enterprise Lab Guide 69

    2) Name the task SXX_ICS_API_Login.

    3) Select Insertfor the Operation.4) For the Source, select SXX ICS API Source Files for the Connection, and

    Src_ICS_User_Cred.csvfor the Object.5) For the Target, select SXX ICS API Lookup Files for the Connection, and

    Tgt_ICS_API_Create_SessionID.csvfor the Object.6) On the Field Mappingpage, add the plug-in, SXX_ICS_API_Login, tothe task.

    7) Map the Source to Plug-infields as follows:

    8) Map the Plug-in to Targetfields as follows:

    9) Validate the mapping.

    10)Save the task.

    Step 12. Run the task and verify results.1) Run the task.

    2) Verify that the task completes without errors.

    3) Verify the results of the task by checking the output file it should contain asession ID.

  • 8/12/2019 Infa Cloud Enterprise Labs - Sum12

    70/84

    70 Informatica Cloud Enterprise Lab Guide

    Module 9 Lab 2: Creating a Plug-in that calls theInformatica Cloud REST API (activityLog)

    Business Scenario:

    On a regular basis, you need to take entries from the Informatica Cloud Activity Logand move them to a database for back-end monitoring and reporting by your IT

    department.

    Lab Scenario:

    In this lab, you will create the second plug-in for the business scenario. This plug-inwill use the SessionID (created and stored in a file by the plug-in you created in the

    previous lab) and will read from the Informatica Cloud Activity Log.

    Goals:

    Practice calling the Informatica Cloud REST API from a plug-in.

    Practice using a Lookup Procedure transformation in a plug-in.

    Duration:

    This lab should take approximately 30 minutes.

    Instruction