You are on page 1of 84

Informatica Cloud Enterprise Lab Guide 1

Informatica

Cloud Enterprise
Training Class
Student Lab Guide
Version ICS 2012-10


















2 Informatica Cloud Enterprise Lab Guide
Informat ica Cloud Ent erprise Training Class - St udent Lab Guide
Version 2.0
No 2011

Copyright (c) 1998-2011 Informatica Corporation.
All right s reserved. Print ed in t he USA.

This soft ware and document at ion contain proprietary information of Informatica Corporation and are provided under a license
agreement cont aining rest rict ions on use and disclosure and are also prot ect ed by copyright law. Reverse engineering of t he soft ware
is prohibit ed. No part of t his document may be reproduced or t ransmit t ed in any form, by any means (elect ronic, photocopying,
recording or ot herwise) wit hout prior consent of Informatica Corporation.

Use, duplicat ion, or disclosure of t he Soft ware by t he U.S. Government is subject t o t he rest rict ions set forth in t he applicable soft ware
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 t his document is subject t o change wit hout not ice. If you find any problems in t he document ation, please r eport
t hem t o us in writ ing. Informat ica Corporation does not warrant t hat t his document ation is error free. Informatica, PowerMart,
PowerCent er, PowerChannel, PowerCent er Connect, MX, and SuperGlue are t rademarks or regist ered t rademarks of Informat ica
Corporat ion in t he Unit ed St at es and in jurisdict ions t hroughout t he world. All ot her company and product names may be t rade names
or t rademarks of t heir respect ive owners.

Port ions of t his soft ware are copyright ed by Dat aDirect Technologies, 1999-2002.

Informat ica PowerCent er product s cont ain ACE (TM) software copyrighted by Douglas C. Schmidt and his research group at
Washingt on Universit y and Universit y of California, Irvine, Copyright (c) 1993-2002, all right s reserved.

Port ions of t his soft ware cont ain copyright ed mat erial from The JBoss Group, LLC. Your right t o use such mat erials is set fort h in t he
GNU Lesser General Public License Agreement , which may be found at ht t p://www.opensource.org/licenses/lgpl -license.php. The
JBoss mat erials are provided free of charge by Informat ica, as-is, wit hout warrant y of any kind, eit her express or implied, including
but not limit ed t o t he implied warrant ies of merchantabilit y and fit ness for a part icular purpose.

Port ions of t his soft ware cont ain copyright ed mat erial from Meta Int egrat ion Technology, Inc. Met a Integration is a r egist ered
t rademark of Met a Int egration Technology, Inc.

This product includes soft ware developed by t he Apache Soft ware Foundat ion (ht t p://www.apache.org/). The Apache Soft ware is
Copyright (c) 1999-2005 The Apache Soft ware Foundat ion. All right s reserved.

This product includes soft ware developed by t he OpenSSL Project for use in t he OpenSSL Toolkit and redist ribut ion of t his sof tware
is subject t o t erms available at ht t p://www.openssl.org. Copyright 1998-2003 The OpenSSL Project . All Right s Reserved.

The zlib library included wit h t his soft ware is Copyright (c) 1995-2003 Jean-loup Gailly and Mark Adler.

The Curl license provided wit h t his Soft ware is Copyright 1996-200, Daniel St enberg, <Daniel@haxx.se>. All Right s Reserved.

The PCRE library included wit h t his soft ware is Copyright (c) 1997-2001 Universit y of Cambridge Regular expression support is
provided by t he PCRE library package, which is open source soft ware, writ t en by Philip Hazel. The source for t his library may be
found at ft p://ft p.csx.cam.ac.uk/pub/soft ware/programming/ pcre.

Inst allAnywhere is Copyright 2005 Zero G Soft ware, Inc. All Right s Reserved.

Port ions of t he Soft ware are Copyright (c) 1998-2005 The OpenLDAP Foundat ion. All right s reserved. Redist ribut ion and use in
source and binary forms, wit h or wit hout modificat ion, are permitted only as aut horized by t he OpenLDAP Public License, available
at ht t p://www.openldap.org/soft ware/release/license.html.

This Soft ware is prot ected by U.S. Pat ent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775 and ot her U.S.
Pat ent s Pending.

DISCLAIMER: Informat ica Corporation provides t his document ation as is wit hout warrant y of any kind, eit her express or implied,
including, but not limit ed t o, t he implied warrant ies of non-infringement, merchantabilit y, or use for a part icular purpose. The
informat ion provided in t his document at ion may include t echnical inaccuracies or t ypographical errors. Informatica could make
improvements and/or changes in t he product s described in t his document at ion at any t ime wit hout notice.



Informatica Cloud Enterprise Lab Guide 3

Link to Training Web Site ........................................................................................................... 4
Module 0: Setting up the Lab Environment: Pre-Steps ................................................................. 5
Module 1 Lab 1: Export an Informatica Cloud Task and Import into PowerCenter ....................... 6
Module 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 ........................................................................ 14
Module 2 Lab 3: Modifying a Plug-in........................................................................................ 16
Module 2 Lab 4: Importing and Running a Workflow as a PowerCenter Service Task ............... 18
Module 4 Lab 1: Create a PowerCenter Service that Converts a Fixed-Width File to a Flat File . 20
Module 4 Lab 2: Converting from XML to Flat File .................................................................. 28
Module 4 Lab 3: Using the PowerCenter Service Task in a Task Flow....................................... 34
Module 5 Lab 1: Modifying the Aggregator Plug-in .................................................................. 35
Module 5 Lab 2: Creating a Plug-in that De-dupes Source Records............................................ 40
Module 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 ................................................... 45
Module 7 Lab 1: Calling a SOAP Style Web Service via RPC ................................................... 49
Module 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) ......... 63
Module 9 Lab 1: Creating a Plug-in that calls the Informatica Cloud REST API (login resource)
................................................................................................................................................. 65
Module 9 Lab 2: Creating a Plug-in that calls the Informatica Cloud REST API (activityLog) ... 70
Module 9 BONUS Lab: Using the Informatica Cloud REST API to Create Real-Time Integration
................................................................................................................................................. 75
Module 10 - Workshop: Bringing it All Together ...................................................................... 78
Appendix A How to Reset Security Token and Create a Salesforce Connection ...................... 80
Appendix B Creating an External ID field in Salesforce.......................................................... 82
Appendix C Creating a Pass-Through Port in the Web Services Consumer Transformation..... 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 is
as 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:
____________________________________


Informatica Cloud Enterprise Lab Guide 5
Module 0: Setting up the Lab Environment: Pre-Steps
For 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 a
SaaS 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 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 are
provided in Appendix A, at the end of this Lab Guide.
3. Create a flat file connection (name the connection SXX-Flat Files where
XX is your student number).

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

6 Informatica Cloud Enterprise Lab Guide
Module 1 Lab 1: Export an Informatica Cloud Task
and Import 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.
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 External
ID field, create one by adding a new custom field to the Account object and
marking it as an external id field.
Note: If you are not familiar with the process for creating an External ID field
in 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 data
into your Salesforce org.
1) Create a new data synchronization task.
2) Specify the following properties for the task:
o Task Name: SXX_LoadAccounts
o Task Operation: Upsert
o Source Connection: Lab SQLServer
o Source Object: Account
o Target Connection: SXX_Salesforce
o Target Object: Account
3) Map the following fields:
Source Field Target Field
Account_name Name
Area_code & Phone_number Phone
AccountId Account_External_ID__c (or

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 web
site and click on the DB Accounts link to view the contents of the Accounts
table.
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) Click OK.
6) Click Next to begin the import.
7) Click the Add All button to import all workflow objects:

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 All button.
8) Click Next.
9) Click in the Destination folder field to select the folder you created for this
class.
10) Select the folder and click OK:

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

Informatica Cloud Enterprise Lab Guide 9

13) Finish the import.
Step 5. Examine the mapping.
1) Open the PowerCenter Designer 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.


10 Informatica Cloud Enterprise Lab Guide
Module 2 Lab 1: Create and Export a Plug-in for Use
in Informatica 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 PowerCenter
repository.
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 Repository
Manager.
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. (http://ec2-75-101-208-253.compute-
1.amazonaws.com/TrainingHelp/Main2.aspx)
2) Navigate to the Workflow XML directory 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 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 a
source file.
1) Create the following directory structure on the machine where you are running
PowerCenter:
C:\a_IOD\Files\
2) Create a subdirectory called PickListPivot.
3) Create the following subdirectories under PicklistPivot:

Informatica Cloud Enterprise Lab Guide 11
Src
Tgt
4) Go to the Training web site, navigate to the Source Data Files directory, and
download the following file:
Customer_Certifications.csv
5) Place this file in the following directory:
C:\a_IOD\Files\PicklistPivot\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 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 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_IOD\files\PickListPivot\Src
5) Enter the following value for source filename:
Customer_certifications.csv

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

Informatica Cloud Enterprise Lab Guide 13

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) Enter SXX-PicklistPivot (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:

8) Click OK to save the plug-in.

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 each
account 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 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_LoadPickList
o Task Operation: Upsert
o Source Connection: Lab SQLServer
o Source Object: Certifications
o Target Connection: SXX_Salesforce
o 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

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?

___________________________________________________

___________________________________________________



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 sort
the 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 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.
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 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:

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) Click OK 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 previous
lab).
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.



18 Informatica Cloud Enterprise Lab Guide
Module 2 Lab 4: Importing and Running a Workflow
as a PowerCenter 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 PowerCenter
Service 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 Service
task in Informatica Cloud.
Duration:
This lab should take approximately 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 or
PowerCenter 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 > PowerCenter Service page.
3) Click the New button.
4) Enter the following details for the task:
o Task Name: SXX_PickListPivot
o 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) 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\PicklistPivot
2) Create the following sub-directories:

Informatica Cloud Enterprise Lab Guide 19
Src
Tgt
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 > PowerCenter Service 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 opening
the picklistpivottarget.out file.
6) The results should look something like this:



20 Informatica Cloud Enterprise Lab Guide
Module 4 Lab 1: Create a PowerCenter Service that
Converts 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-width
format 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.
Instructions
Step 1. Download the fixed-width file.
1) Create a new subdirectory under c:\a_IOD\Files called FixedFormat.
2) Create a Src subdirectory.
3) Go to the Training web 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:

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


22 Informatica Cloud Enterprise Lab Guide


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


8) Click the Finish button when you are finished.

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

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 field
contains a comma:

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:
Val
idate 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:

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 Task
Developer 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:

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

Informatica Cloud Enterprise Lab Guide 27
2) Import the workflow as a PowerCenter Service in Informatica Cloud
use the naming convention, SXX_FixedFormattoFF.
3) Run the PowerCenter Service task and verify results on the agent
machine.
Step 10. Create a data synchronization task and task flow.
1) Create a data synchronization task that loads data from the resulting flat
file 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 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_FixedWidthLeads.
6) Run the task flow and verify results in Salesforce.


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 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 XML
source.
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:


Informatica Cloud Enterprise Lab Guide 29
4) Before you click Open, click the Advanced Options link (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 Open to 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, you
must create the target flat file(s). In order to do this, youll need to think about
the 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.csv
Contacts.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:

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 the Import field names from first line option
and click Next:

7) Click Next again.

Informatica Cloud Enterprise Lab Guide 31

8) On Step 3 of the wizard, be sure to increase the Length/Precision of all fields
in 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 and
adjust the Length/Precision:

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 you
created previously to add it to the mapping.
3) Drag-and-drop the flat file target (Companies.csv) you created previously to
add it to the mapping.
4) Drag and drop the fields under the X_Customer object from the Source
Qualifier 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 add
it to the mapping.

Informatica Cloud Enterprise Lab Guide 33
4) Drag and drop the fields (under the X_Contact object) from the Source
Qualifier 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_ParseXMLContacts and SXX_ParseXMLCompanies.
3) Run the PowerCenter Service tasks and verify results on the agent
machine.

34 Informatica Cloud Enterprise Lab Guide
Module 4 Lab 3: Using the PowerCenter Service Task
in a 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 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 approximately 20 minutes

Step 1. Create a data synchronization task that loads data into the
Salesforce Account object.
1) Create a data synchronization task that loads data from the resulting flat
file 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 the
Salesforce Contacts object.
1) Create a data synchronization task that loads data from the resulting flat
file 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 flow SXX_XMLAccountsContacts.
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.


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 into
Salesforce 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.
Instructions
Step 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 Informatica
Marketplace.
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:

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 Sorter
transformation.
7) Drag the OrderType port from the Sorter transformation to the Aggregator
transformation.
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 (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 Aggregator transformation should contain the following ports:



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 using
Repository 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, under
the Source and Target Files directories.
o Source Definition: Orders.xml
o 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:

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 Target file properties on the
Mapping 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 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) 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 OK 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_SumOrderTotals
o Task Operation: Upsert
o Source Connection: Lab SQL Server
o Source Object: Orders

Informatica Cloud Enterprise Lab Guide 39
o Target Connection: SXX_Salesforce
o 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_in
OrderTotal 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 correct
values.


40 Informatica Cloud Enterprise Lab Guide
Module 5 Lab 2: Creating a Plug-in that De-dupes
Source Records
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 Informatica
Cloud, 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
Instructions
Step 1. Examine the source file
1) 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 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.

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:

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 Src subdirectory.
3) Create a Tgt 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) Enter SXX_RemoveDupes (where XX is your student number) for the plug-
in name.
6) Select True for the Active option.

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: Insert
o Source Connection: Flat file connection that contains
TradeshowLeads.csv file
o Source Object: TradeshowLeads.csv
o Target Connection: SXX_Salesforce
o 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_Field2
Company 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 City
out_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?


44 Informatica Cloud Enterprise Lab Guide
Module 5 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 matching
algorithm 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.
Instructions
There are no step-by-step instructions for this lab. HINT: Try adding an expression on the
MATCH_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?

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

________________________________________________________________________

Informatica Cloud Enterprise Lab Guide 45
Module 6 Lab 1: Calling a Twitter Method via the
REST API
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.
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 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_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 the
method 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:

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 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 you
may 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=E
N
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:

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

48 Informatica Cloud Enterprise Lab Guide
4) Enter SXX-TwitterSearch (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 OK 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_TwitterSearch
o Task Operation: Upsert
o Source Connection: LabFiles
o Source Object: searchCriteria.csv
o Target Connection: SXX_Salesforce
o 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:
EN
7) 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.

Informatica Cloud Enterprise Lab Guide 49
Module 7 Lab 1: Calling a SOAP Style Web Service
via RPC
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 via
RPC).
Practice using the Web Services Consumer transformation in PowerCenter.
Duration:
This lab should take approximately 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 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:

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 the
tns_LastModifiedDate port on the WebServices Consumer transformation:

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 under c:\a_IOD\Files called
GetRecentAccounts.
2) Create a Src subdirectory.
3) Create a Tgt 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

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 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) Enter SXX_GetRecentAccounts (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) Click OK 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_GetRecentAccounts
o Task Operation: Upsert
o Source Connection: Flat File connection that contains
Date_Mod.csv
o Source Object: Date_Mod.csv
o Target Connection: SXX_Salesforce
o Target Object: Account
3) Add the plug-in, SXX_GetRecent Accounts, on the Field Mapping page.
4) Select the Source to Plug-in mapping.

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.


54 Informatica Cloud Enterprise Lab Guide
Module 7 Lab 2: Creating a Log-In Plug-in (Using
Casual Token-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.
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/Conte
nt/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:


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 Repository
Manager.
1) Go to the Training web site.
2) Navigate to the Workflow XML directory 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 SFDC under C:\a_IOD\Files\.
2) Create the following subdirectories under SFDC:
Src
Tgt
Lkp
3) Go to the Training web site, navigate to the Source Data Files directory, and
download the following file:
SFDC_Login.csv
4) Place this file in the following directory:
C:\a_IOD\Files\SFDC\Src
5) 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 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.

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

56 Informatica Cloud Enterprise Lab Guide
3) Select the login operation:

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

6) Click Finish.
7) Double-click the Web Services Consumer transformation to open the properties
dialog.
8) Click on the Web Services Consumer Properties tab.
9) Click the Add Pass-through Port button.
10) Add the following pass-through ports:

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 Navigator window.
19) Map fields from the Expression transformation to the Web Services
Consumer transformation as follows:

58 Informatica Cloud Enterprise Lab Guide

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

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.

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 New button.
5) Enter SXX_SFDC_Login (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.
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 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.

60 Informatica Cloud Enterprise Lab Guide
Module 7 Lab 3: Creating a Convert Leads Plug-in
that Uses 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.
Instructions
Step 1. Review the Salesforce API documentation for convertLead().
1) Go to the following URL to review the documentation for the convertLead()
web service:
http://www.salesforce.com/us/developer/docs/api/Conte
nt/sforce_api_calls_convertlead.htm
Step 2. Download the workflow xml and import into the Repository
Manager.
1) Go to the Training web site.
2) Navigate to the Workflow XML directory and download the following file:
wf_m_Salesforce_ConvertLead.xml
3) 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:
ConvertLeads.csv
2) Place this file in the following directory:
C:\a_IOD\Files\Salesforce\Src
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.

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

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 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 OK 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 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 Insert for the Operation.
4) For the Source, select SXX SFDC Source Files for the Connection, and
ConvertLeads.csv for the Object.
5) For the Target, select SXX SFDC Target Files for the Connection, and
tgt_SFDC_ConvertLead_out.csv for the Object.
6) On the Field Mapping page, add the plug-in,
SXX_SFDC_ConvertLeads, 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 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.

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 (Using
Casual Token-Style Authentication)
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 logs out of Salesforce.com thereby
releasing 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() web
service:
http://www.salesforce.com/us/developer/docs/api/Conte
nt/sforce_api_calls_logout.htm
Step 2. Download the workflow xml and import into the Repository
Manager.
1) Go to the Training web site.
2) Navigate to the Workflow XML directory and download the following file:
wf_SFDCLogout.xml
3) Import the xml into your PowerCenter Repository Manager.
Step 3. Download the lookup target file.
1) Go to the Class Resources web site and navigate to the Target Files directory.
2) Download the file, SFDC_Logout_Message.csv, and save it to the
c:\a_IOD\Files\Salesforce\Tgt directory.
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.

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 New button.
5) Enter SXX_SFDC_Logout (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 6. Create a data synchronization task.
1) Create a data synchronization task.
2) Name the task SXX_SFDC_Logout.
3) Select Insert for the Operation.
4) For the Source, select SXX SFDC Lookup Files for the Connection,
and Salesforce_Session.csv for the Object.
5) For the Target, select SXX SFDC Target Files for the Connection, and
sfdc_logout_message.csv for the Object.
6) On the Field Mapping page, add the plug-in, SXX_SFDC_Logout, 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 Tgt directory.

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 the
Informatica Cloud REST API (login resource)
Business Scenario:
On a regular basis, you need to take entries from the Informatica Cloud Activity Log
and 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 API
and 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 API link.
3) Click on the login link.
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:
<?xml version="1.0" encoding="utf-8"?>
<LoginResponse>
<errorCode>NO_ERROR</errorCode>
<errorMsg></errorMsg>
<sessionId>ijJepc5K+IIntsaNVBkGiMCDl3QBr8ruap4grRToHnyhzim

66 Informatica Cloud Enterprise Lab Guide
2PkuP7qRX2iY1gHMY</sessionId>
</LoginResponse>
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 Training web site.
2) Navigate to the Workflow XML directory and download the following file:
wf_ICS_API_Logon.xml
3) 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 Src subdirectory.
3) Go to the Training web 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 Training web site and navigate to the Target Files directory.
3) Download the file, Tgt_ICS_API_Create_SessionID.csv, and save it to this
directory.
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 HTTP tab.
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 Parser transformation.
The Import XML Definition screen is displayed.
2) Select the file you saved in Step 2, above:

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 Parser transformation to edit the properties.
6) Click on the Midstream XML Parser tab (you will need to click the right
arrow 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 a
new 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 Parser transformation
as follows:

68 Informatica Cloud Enterprise Lab Guide

11) Map fields from the XML Parser transformation to the Expression
transformation 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 New button.
5) Enter SXX_ICS_API_Login (where XX is your student number).
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.
8) Click OK to 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.

Informatica Cloud Enterprise Lab Guide 69
2) Name the task SXX_ICS_API_Login.
3) Select Insert for the Operation.
4) For the Source, select SXX ICS API Source Files for the Connection, and
Src_ICS_User_Cred.csv for the Object.
5) For the Target, select SXX ICS API Lookup Files for the Connection, and
Tgt_ICS_API_Create_SessionID.csv for the Object.
6) On the Field Mapping page, add the plug-in, SXX_ICS_API_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) 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 a
session ID.

70 Informatica Cloud Enterprise Lab Guide
Module 9 Lab 2: Creating a Plug-in that calls the
Informatica Cloud REST API (activityLog)
Business Scenario:
On a regular basis, you need to take entries from the Informatica Cloud Activity Log
and 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-in
will 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.
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 API link.
3) Click on the activitylog link.
4) Review the documentation for the resource.
5) List the one required parameter:

________________________________________________________

6) List the optional parameters:

________________________________________________________

________________________________________________________

7) Review the return elements.
Step 2. Save the response in an xml file.
1) Copy the sample response from the documentation:
<?xml version="1.0" encoding="utf-8"?>
<ActivityLogResponse>
<errorCode>NO_ERROR</errorCode>
<errorMsg></errorMsg>
<entries> <ActivityLogEntry>
<type>WORKFLOW</type>
<objectName>task flow</objectName>
<runId>1</runId>
<startTime>2011-05-06T19:38:38.000Z</startTime>

Informatica Cloud Enterprise Lab Guide 71
<endTime>2011-05-06T19:39:35.000Z</endTime>
<success>1</success>
<failedSourceRows>0</failedSourceRows>
<successSourceRows>60</successSourceRows>
<failedTargetRows>0</failedTargetRows>
<successTargetRows>60</successTargetRows>
<entries> <ActivityLogEntry>
<type>DRS</type>
<objectName>DRS</objectName>
<runId>9</runId>
<startTime>2011-05-06T19:38:38.000Z</startTime>
<endTime>2011-05-06T19:39:16.000Z</endTime>
<success>1</success>
<failedSourceRows>0</failedSourceRows>
<successSourceRows>26</successSourceRows>
<failedTargetRows>0</failedTargetRows>
<successTargetRows>26</successTargetRows>
<entries> <ActivityLogEntry>
<type>DRS</type>
<objectName>Lead</objectName>
<runId>0</runId>
<startTime>2011-05-06T19:38:42.000Z</startTime>
<endTime>2011-05-06T19:38:51.000Z</endTime>
<success>1</success>
<failedSourceRows>0</failedSourceRows>
<successSourceRows>22</successSourceRows>
<failedTargetRows>0</failedTargetRows>
<successTargetRows>22</successTargetRows>
<errorMsg>No errors encountered.</errorMsg>
</ActivityLogEntry>
2) Paste it into a text editor.
3) Save the file (use a .xml extension).
Step 3. Download the rowlimit source file.
1) Go to the Class Resources web site and navigate to the Source Files directory.
2) Download the file, Src_ICS_Activity_Rowlimit.csv.
3) Save it to the c:\a_IOD\Files\ICS_API\Src directory.
Step 4. Download the target file.
1) Go to the Class Resources web site and navigate to the Target Files directory.
2) Download the file, Tgt_ICS_API_ActivityLogResponse.csv, and save it to
the c:\a_IOD\Files\ICS_API\Tgt directory.
Step 5. Download the workflow xml and import into the Repository
Manager.
1) Go to the Training web site.
2) Navigate to the Workflow XML directory and download the following file:
wf_IOD_API_ActivityLog.xml
3) Import the xml into your PowerCenter Repository Manager.
Step 6. Examine the mapplet.
1) Open the mapplet, mplt_IOD_API_ActivityLog.
2) Open the Lookup Procedure transformation.
3) Note the lookup condition:
________________________________________________________



72 Informatica Cloud Enterprise Lab Guide


4) Open the last expression transformation.
5) Examine the Seq_v port.
6) What is the purpose of this port?
________________________________________________________
Step 7. Use the Target Designer tool to create a target definition.
1) In PowerCenter Designer, open the Target Analyzer tool.
2) From the Target menu, select Import from File.
3) Locate the file you downloaded in the previous step and select it.
4) Save your changes.
Step 8. Create a mapping.
1) Create a mapping and add the mapplet, target definition, and source definition
you created above.
Note that the mapping should look something like this:

2) Validate and save the mapping.
Step 9. 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 10. Validate and run the workflow.
1) Validate and run the workflow.
2) Verify results by examining the output file that was created.
Step 11. 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) Enter SXX_ICS_API_ActivityLog (where XX is your student number).
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) The page should look like this:

Informatica Cloud Enterprise Lab Guide 73

9) Click OK to save the plug-in.
Step 12. Create a connection for the target file.
1) Create a new directory under c:\A_IOD|Files\ICS_API called Tgt.
2) From the Training web site, click on the Target Files link and download the
file, ICS_API_ActivityLogResponse.csv.
3) Save this file to the new directory.
4) In Informatica Cloud, create a flat file connection called
SXX_ICS_API_Targets that points to this directory.
Step 13. Create a data synchronization task.
1) Create a data synchronization task.
2) Name the task SXX_ICS_API_ActivityLog.
3) Select Insert for the Operation.
4) For the Source, select SXX ICS API Source Files for the Connection,
and src_IOD_Activity_Rowlimit.csv for the Object.
5) For the Target, select the SXX_ICS_API_Targets flat file connection,
and for the Connection, and ICS_API_ActivityLogResponse.csv for
the Object.
6) On the Field Mapping page, add the plug-in,
SXX_ICS_API_ActivityLog, to the task.
7) Map the Source to Plug-in fields as follows:

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

74 Informatica Cloud Enterprise Lab Guide

9) Save and run the task.
10) Verify results by opening the target file.
11) The file should contain the first 1000 results from the Activity Log for your
Informatica Cloud org.

Informatica Cloud Enterprise Lab Guide 75
Module 9 BONUS Lab: Using the Informatica Cloud
REST API to Create Real-Time Integration
Business Scenario:
You want to create a real-time integration between Salesforce and your order
management system. Each time that an opportunity is closed in Salesforce, you want
to automatically move some of the opportunity and account data to a database table.
In this lab, you will create an APEX class and related trigger that calls the
Informatica Cloud REST API to run a task.
Lab Scenario:
Note that setting up APEX triggers and classes requires a specific set of permissions
and access levels in Salesforce. If you are working in a Developer account, you
shouldnt have any problems completing the lab as documented here. If you are
working in a Salesforce sandbox account, you may run into permissions issues.
Goals:
Learn how to build a plug-in that calls a web service method (via REST API).
Learn how to use the runjob resource in the Informatica Cloud REST API.
Learn how to create an APEX class.
Learn how to create an APEX trigger.
Duration:
This lab should take approximately 25 minutes
Instructions
Step 1. Create a data synchronization task to upsert closed/won
opportunities.
1) Name the task: SXX_ProcessOrders.
2) Select Operation: Upsert.
3) Select Source Connection: SXX_SFDCDeveloper.
4) Select (Multiple) Source Objects: Opportunity and Account.
5) Select Target Connection: Lab SQLServer.
6) Select Target Object: ProcessOrders.
7) Specify the following data filter:
(IsClosed = True AND IsWon = True) AND
(LastModifiedDate > $Lastruntime OR CreatedDate >
$Lastruntime)
8) Specify the following field mappings:
Source Object Source Field Target Field
Opportunity Amount OpportunityAmount
Opportunity CloseDate CloseDate
Opportunity Id OpportunityID
Opportunity Name OpportunityName
Opportunity Type OpportunityType
Account Name2 AccountName

76 Informatica Cloud Enterprise Lab Guide
9) Validate the mapping.
10) Save the task.
11) Run the task to establish the $lastruntime variable.
Step 2. Create an APEX class.
1) In Salesforce, go to Setup -> Develop -> Apex Classes.
2) Click the New button.
3) Enter the following into the code editor:
public with sharing class CreateOrder {

@future (callout=true)

public static void runjob(String username, String
password, String jobName, String jobType) {

HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
Http http = new Http();


req.setEndpoint('https://app.informaticaondemand.com/
saas/api/1/runjob');
req.setMethod('POST');

req.setBody('username='+EncodingUtil.urlEncode(userna
me, 'UTF-8')+

'&password='+EncodingUtil.urlEncode(password, 'UTF-
8')+

'&jobName='+EncodingUtil.urlEncode(jobName, 'UTF-8')+

'&jobType='+EncodingUtil.urlEncode(jobType, 'UTF-
8'));

try {
res = http.send(req);
}
catch(System.CalloutException e) {
System.debug('Job Error: '+ e);
System.debug(res.toString());
}

}
4) Click Save.
Step 3. Add Informatica Cloud as a Remote Site in Salesforce.
1) In Salesforce, go to Setup -> Security Controls -> Remote Site Settings.
2) Click New Remote Site.
3) Enter the following details:

Informatica Cloud Enterprise Lab Guide 77

4) Click Save.
Step 4. Create a trigger on the Opportunity object.
1) In Salesforce, go to Setup -> Customize -> Opportunities -> Triggers.
2) Click the New button.
3) Enter the following code in the editor:
trigger CallInsertOrder on Opportunity (after update)
{
for (Opportunity o : Trigger.new) {

CreateOrder.runjob('icstrainingsfdc@gmail.com','pass-
word,'z_InsertOrders','DSS');
}
}
4) Click Save.
Step 5. Test and verify results.
1) In Salesforce, find an open opportunity (if there are no open opportunities,
create a new opportunity and save it).
2) Edit the opportunity and change the opportunitys Stage to Closed Won.
3) In Informatica Cloud, go to the Activity Monitor page you may want to open
this page in a new browser window, so you can see both pages at once.
4) Save the opportunity.
5) Quickly check the Activity Monitor you should see the
SXX_ProcessOrders job running.
6) When the job has completed, go to the training web site and click on the DB
Process Orders link.
7) Make sure that the opportunity you just edited has been added to the table.

78 Informatica Cloud Enterprise Lab Guide
Module 10 - Workshop: Bringing it All Together
Business Scenario:
Your company uses Salesforce.com and a SaaS Order Management system. On a
regular schedule, you would like to take opportunities that have a stage of Closed
Won in Salesforce, and add them (as Orders) into your Order Management system.
As those orders go through various stages of processing in the Order Management
system, you want to regularly update the status of the related opportunity in
Salesforce, so that Sales and Service reps have easy access to this information.
Goals:
Practice applying the concepts you learned in this class to a real-world
business scenario.
Practice building plug-ins from business requirements.
Practice building ICS tasks that use plug-ins.

Instructions
You will need to create two custom fields on the opportunity object in Salesforce:
Order Number this field will be used to store an order number, and the
value will be used to identify the order in the Order Management system.
This can be set up as an auto-number or formula field, if you wish. Or, you
can manually populate this field when you update an opportunity. For
purposes of the class, it is best to include your student number as part of the
value for this field, so you can easily identify orders that you have inserted
into the Orders table.
Order Status this field will be used to hold the status of the order that is
returned from the Order Management system.

To insert orders into the Order Management system, you can call the addOrder web
service. To get the status of orders, you can use the GetOrderStatus web service. Note
that both of these web services are part of the WSDL that you used earlier in the class,
and are available in the test screen. Go to the training web site to view this information.

Workshop Hints
Here are some additional hints to help you get started:
You will need to create two plug-ins in PowerCenter one that adds orders, and
one that returns order status.
You will also need to create two tasks in Informatica Cloud one that uses each
of the above plug-ins.
Both tasks will use an upsert operation on the Opportunity object in Salesforce.
On task 1, you will want to filter by Stage=Closed Won and Order Status = Null.


Informatica Cloud Enterprise Lab Guide 79
Workshop Testing
To test the workshop, you will need to create an opportunity in Salesforce. The
opportunity should be related to one of the accounts in the exercises data set Tyco,
Geneworth, Honeywell International, etc. Make sure you enter a value for the Order
Number field. Add one or more products to the opportunity, so it has a dollar amount. Set
the opportunitys status to Closed Won, and run your Informatica Cloud task flow.

You can verify results in several ways:
Verify that the order was added to the Order Management system by
going to the Training web site and clicking on the DB Orders link.
Locate the order you created.
Verify that the order status was returned to Salesforce by viewing the
opportunity in Salesforce. The order status should be Received.

80 Informatica Cloud Enterprise Lab Guide
Appendix A How to Reset Security Token and
Create a Salesforce Connection
Instructions
Step 1. Reset your security token in Salesforce.com
NOTE: You can skip this step if you have already requested a security token for
your Salesforce login (and have access to that token).
1) Log in to Salesforce.com.
2) Click on your username and select Setup:

3) In the My Personal Information section, click the Reset your security token
option:

4) Click the Reset Security Token button:

Step 2. Copy the security token.
1) Go to your email.

Informatica Cloud Enterprise Lab Guide 81
2) Locate the email from support@salesforce.com.
3) Copy your security token:

Step 3. Create a Salesforce.com connection.
1) Go back to Informatica Cloud.
2) Click on the Configuration tab.
3) Click on Connections.
4) Click the New button:

The New Connection page is displayed.
5) Enter SXX_SFDCDeveloper (where XX is your student number) in the
Connection Name field.
6) You can optionally enter a description in the Description field.
7) Select Salesforce from the Type menu.
8) Enter your Salesforce.com user name in the User Name field.
9) Enter your Salesforce.com password in the Password field.
10) Paste your Salesforce.com security token (copied from the email) into the
Security Token field.
11) Click Test to test the connection before saving it:

82 Informatica Cloud Enterprise Lab Guide

You should see a message that the test was successful.
12) Click OK.

Appendix B Creating an External ID field in
Salesforce
Instructions
1) Log in to Salesforce.com (use your developer login).
2) Click Setup.
3) Click App Setup -> Customize -> Accounts.
4) Click on Fields.
5) Click New in the Account Custom Fields & Relationships section:

6) Select Text for the field type.
7) Click Next:

Informatica Cloud Enterprise Lab Guide 83

8) Enter Account External ID in the Name field.
9) Enter 150 in the Length field.
10) Select the External ID checkbox.
11) Click Next:

12) Click Next.
13) Click Save.

84 Informatica Cloud Enterprise Lab Guide
Appendix C Creating a Pass-Through Port in the
Web Services Consumer Transformation
Instructions
Step 1. Add the pass through-port.
1) Open the Web Services Consumer transformation Edit Transformations
dialog.
2) Click on the Web Services Consumer Properties tab.
3) Click the Add Pass-through Port button.
4) Click to add a new port.
5) Specify the name, precision and length of the port.

6) Click OK.
7) Click OK again to close the Edit Transformations dialog.
Step 2. Add the pass-through port to the WSDL.
1) Right-click in the header bar for the Web Services Consumer transformation
and select WSDL Workspace -> Output mode.
2) Right-click on the header of the XML object and select Add a Reference Port.

You might also like