You are on page 1of 90

Informatica Cloud Enterprise

Training Class
Student Lab Guide
Version ICS 2012-10

Informatica Cloud Enterprise Lab Guide

Informatica Cloud Enterprise T raining Class - Student Lab Guide


Version 2.0
No 2011
Copyright (c) 1998-2011 Informatica Corporation.
All rights reserved. Printed in the USA.
T his software and documentation contain proprietary information of Informatica Corporation and are provided under a license
agreement containing restrictions on use and disclosure and are also protected by copyright law. Reverse engineering of the software
is prohibited. No part of this document may be reproduced or transmitted in any form, by any means (electronic, photocopying,
recording or otherwise) without prior consent of Informatica Corporation.
Use, duplication, or disclosure of the Software by the U.S. Government is subject to the restrictions set forth in the applicable software
license agreement and as provided in DFARS 227.7202-1(a) and 227.7702-3(a) (1995), DFARS 252.227-7013(c)(1)(ii) (OCT 1988),
FAR 12.212(a) (1995), FAR 52.227-19, or FAR 52.227-14 (ALT III), as applicable.
T he information in this document is subject to change without notice. If you find any problems in the documentation, please r eport
them to us in writing. Informatica Corporation does not warrant that this documentation is error free. Informatica, PowerMart,
PowerCenter, PowerChannel, PowerCenter Connect, MX, and SuperGlue are trademarks or registered trademarks of Informatica
Corporation in the United States and in jurisdictions throughout the wo rld. All other company and product names may be trade names
or trademarks of their respective owners.
Portions of this software are copyrighted by DataDirect T echnologies, 1999 -2002.
Informatica PowerCenter products contain ACE (T M) software copyrighted by Douglas C. Schmidt and his research group at
Washington University and University of California, Irvine, Copyright (c) 1993 -2002, all rights reserved.
Portions of this software contain copyrighted material from The JBoss Group, LLC. Your right to use such materials is set forth in the
GNU Lesser General Public License Agreement, which may be found at http://www.opensource.org/licenses/lgpl -license.php. T he
JBoss materials are provided free of charge by Informatica, as-is, without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a particular purpose.
Portions of this software contain copyrighted material from Meta Integration Technology, Inc. Meta Integration is a r egistered
trademark of Meta Integration T echnology, Inc.
T his product includes software developed by the Apache Software Foundation (http://www.apache.org/). T he Apache Software is
Copyright (c) 1999-2005 T he Apache Software Foundation. All rights reserved.
T his product includes software developed by the OpenSSL Project for use in the OpenSSL T oolkit and redistribution of this sof tware
is subject to terms available at http://www.openssl.org. Copyright 1998 -2003 The OpenSSL Project. All Rights Reserved.
T he zlib library included with this software is Copyright (c) 1995-2003 Jean-loup Gailly and Mark Adler.
T he Curl license provided with this Software is Copyright 1996 -200, Daniel Stenberg, <Daniel@haxx.se>. All Rights Reserved.
T he PCRE library included with this software is Copyright (c) 1997-2001 University of Cambridge Regular expression support is
provided by the PCRE library package, which is open source software, written by Philip Hazel. T he source for this library may be
found at ftp://ftp.csx.cam.ac.uk/pub/software/programming/ pcre.
InstallAnywhere is Copyright 2005 Zero G Software, Inc. All Rights Reserved.
Portions of the Software are Copyright (c) 1998-2005 T he OpenLDAP Foundation. All rights reserved. Redistribution and use in
source and binary forms, with or without modification, are permitted only as authorized by the OpenLDAP Public License, available
at http://www.openldap.org/software/release/license.html.
T his Software is protected by U.S. Patent Numbers 6,208,990; 6,044,374; 6,014,670; 6,032,158; 5,794,246; 6,339,775 and other U.S.
Patents Pending.
DISCLAIMER: Informatica Corporation provides this documentation as is without warranty of any kind, either express or implied,
including, but not limited to, the implied warranties of non-infringement, merchantability, or use for a particular purpose. T he
information provided in this documentation may include technical inaccuracies or typographical errors. Informatica could make
improvements and/or changes in the products described in this documentation at any time without notice.

Informatica Cloud Enterprise Lab Guide

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

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

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.

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

other field with external ID


property)
Type

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

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

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.

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

10

Informatica Cloud Enterprise Lab Guide

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.
1)
2)
3)
4)

Open and examine the mapplet.


Open the PowerCenter Designer application.
Open the mapplet, PickListPivotMapplet, in the Mapplet Designer tool.
Open the Aggregator transformation.
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)
2)
3)
4)

Open the PowerCenter Workflow Manager application.


Open the workflow, wf_PickList_Pivot, in the Workflow Designer tool.
Edit the session task.
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

Informatica Cloud Enterprise Lab Guide

11

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)
10)
11)
12)

12

Save the workflow.


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

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

13

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

14

Informatica Cloud Enterprise Lab Guide

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?

___________________________________________________
___________________________________________________

Informatica Cloud Enterprise Lab Guide

15

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.
1)
2)
3)
4)
5)
6)

16

Update the workflow.


Go back to PowerCenter Workflow Manager.
Open the workflow, wf_PickList_Pivot.
Right-click on the session and select Validate.
Run the workflow
Check the PowerCenter Workflow Monitor to verify that the task succeeded.
Verify the results by opening the output file. The file contents should look
something like this:

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

17

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)
2)
3)
4)

Go back to Informatica Cloud.


Click on the Data Services > PowerCenter Service page.
Click the New button.
Enter the following details for the task:
o Task Name: SXX_PickListP ivot
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:

18

Informatica Cloud Enterprise Lab Guide

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)
2)
3)
4)

Go to the Data Services > PowerCenter Service page.


Locate your task, SXX_PickListPivot.
Run the task by clicking the green run button.
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:

Informatica Cloud Enterprise Lab Guide

19

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.
1)
2)
3)
4)
5)

Step 2.

Download the fixed-width file.


Create a new subdirectory under c:\a_IOD\Files called FixedFormat.
Create a Src subdirectory.
Go to the Training web site and navigate to the Source Files directory.
Download the file, Student_Lead.txt.
Save it to the directory you created.

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:

20

Informatica Cloud Enterprise Lab Guide

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
1
2
3
4
5
6
7
8
9
10

Position
1-2
3 - 27
28 - 43
44
45 - 69
70 - 116
117 143
144 - 145
146 - 154
155 - 166

Field Name
Reporting Year
Last Name
First Name
Middle Initial
Street Address
Email Address
City
State
Zip Code
Phone

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

Informatica Cloud Enterprise Lab Guide

21

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:

22

Informatica Cloud Enterprise Lab Guide

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:

Informatica Cloud Enterprise Lab Guide

23

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:

24

Informatica Cloud Enterprise Lab Guide

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:

Informatica Cloud Enterprise Lab Guide

25

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.

26

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

27

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:

28

Informatica Cloud Enterprise Lab Guide

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:

Informatica Cloud Enterprise Lab Guide

29

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.

30

Informatica Cloud Enterprise Lab Guide

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:

Informatica Cloud Enterprise Lab Guide

31

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.

32

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

33

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.

Name the task flow SXX_XMLAccountsContacts.


Add both PowerCenter Service tasks.
Select the Stop on Error option.
Add the two data synchronization tasks you created, above.
Select the Stop on Error option for the Accounts task.
Verify results.
Run the task flow.
Verify results.
3) Log into Salesforce and verify that the records have been added
properly.

2)
3)
4)
5)
6)
Step 4.
1)
2)

34

Informatica Cloud Enterprise Lab Guide

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)
2)
3)
4)
5)
6)
7)
8)
9)

Step 3.
1)
2)
3)
4)
5)

Go to the Informatica home page (www.informatica.com).


Click on the Marketplace link (top, right-hand corner of the page).
Click on Blocks and select Cloud Data Integration.
Click on the Informatica Cloud Aggregator Plug-in link.
Click the Download button.
Note: You will be prompted to log in.
Enter your Informatica community credentials.
Click the Download button again.
Save the file to your local machine.
Import the workflow into your PowerCenter Repository Manager.

Edit the mapplet.


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

Informatica Cloud Enterprise Lab Guide

35

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:

36

Informatica Cloud Enterprise Lab Guide

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:

Informatica Cloud Enterprise Lab Guide

37

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

38

Informatica Cloud Enterprise Lab Guide

3)
4)
5)

1)
2)

3)
4)

Step 11.

o Target Connection: SXX_Salesforce


o Target Object: Account
Add the plug-in, SXX_Aggregator, on the Field Mapping page.
Select the Source to Plug-in mapping.
Map the following fields:
Source
Plug-in
AccountId
AccountID_in
OrderTotal
OrderTotal_in
OrderType
OrderType
Select the Plug-in to Target mapping.
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
Validate the mapping.
Save and run the task.

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.

Informatica Cloud Enterprise Lab Guide

39

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_Dedupe SourceRecords_3Fields .XML
file.
4) Save the file to your local machine.
5) Import the workflow into your PowerCenter Repository Manager.

Step 3.

40

Edit the mapplet.

Informatica Cloud Enterprise Lab Guide

1)
2)
3)
4)

In the Designer tool, open and edit the mapping, m_DedupeSourceRecords .


Open the mapplet.
Open the Input transformation.
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:

Informatica Cloud Enterprise Lab Guide

41

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


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 plugin name.
6) Select True for the Active option.

42

Informatica Cloud Enterprise Lab Guide

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?

Informatica Cloud Enterprise Lab Guide

43

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?
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________
________________________________________________________________________

44

Informatica Cloud Enterprise Lab Guide

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.
1)
2)
3)
4)

Examine the existing Twitter plug-in.


Go to the Informatica training org.
Click on Configuration > Plug-ins.
Click on the z_Twitter Search plug-in to view the details of the plug-in.
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.
1)
2)
3)
4)

Step 4.

Download the source file.


Create a new folder in the a_IOD\Files directory called Twitter.
Go to the Training web site.
Click on the Source Data Files link.
Download the searchCriteria.csv file and save it to the Twitter directory.

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:

Informatica Cloud Enterprise Lab Guide

45

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:

46

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

47

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.

48

Informatica Cloud Enterprise Lab Guide

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

Informatica Cloud Enterprise Lab Guide

49

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:

50

Informatica Cloud Enterprise Lab Guide

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

Informatica Cloud Enterprise Lab Guide

51

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.

52

Informatica Cloud Enterprise Lab Guide

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
BillingP ostalCode
billingState
BillingState
Area_code
Phone
Concat(area_code,
Phone_number
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.

Informatica Cloud Enterprise Lab Guide

53

Module 7 Lab 1: Creating a Plug-in that Uses the


Salesforce Merge Transformation to Merge Duplicate
Leads
Business Scenario:
You have run a Data Quality Assessment task, and the task has identified a number
of duplicate lead records in your Salesforce instance. You would like to select a
master record (the record with the most recent CreatedDate), then merge the
duplicate records ensuring that any child objects are retained and attached to the
mater lead.
Lab Scenario:
In this lab, you will create a PowerCenter mapplet that uses a Salesforce Merge
transformation to merge duplicate records in the Lead object. You will use a Sorter
transformation to identify the master record (finding the latest record based on value
of the CreatedDate column). You will then use the Salesforce Merge transformation
to merge the duplicate records, retaining the master record and deleting the slave
records from Salesforce.
Goals:
Learn how to build a plug-in that uses Salesforce Merge transformation to merge
duplicate records identified by the Data Assessment Service and use the
Salesforce connection.

Duration:
This lab should take approximately 30 minutes.

Instructions
Step 1.

Create duplicate lead(s) in Salesforce.

1) Log into your Salesforce instance and view existing leads.


2) Note the details of one or more leads.
3) Use these details to create one or more duplicate leads.
Note that you can use the Clone button to clone a lead.

Step 2.
Create and run a data assessment task to identify duplicate
leads.
1) Create a data assessment task.
2) Specify the following properties for the task:
o Source Connection: SXX_Salesforce
o Data Object: Lead
3) On Step 2, Quality Metrics, click on the Customize Weights button next to
Duplicates.

54

Informatica Cloud Enterprise Lab Guide

4) Configure the matching algorithm to identify duplicate records by assigning


weights to the following fields:
Task Field
Last Name
First Name
Postal Code
Phone
Email

Weight
20
20
30
15
15

5) Enter 85 in the Threshold Value field.


6) Un-check the Field Level Metrics checkboxes for Completeness,
Conformance , and Address Validation.
7) Save the task.
8) Run the task.
9) Click the View Results button to view the results of the task:

10) Click on the hyperlink, x% of Lead records are duplicate in the Top
Issues section.
11) Add the following fields to the list of Selected Fields: ID, FirstName,
LastName, Company, Street, City, State, PostalCode, Country, Phone, Email,
CreatedDate.
12) Click the Fetch Data button.
13) Click the Download to Excel button.
14) Click on Home -> Data Files.
15) Click the Download File button for your file and and save the file to the
following source directory:
C:\a_IOD\Files\SF_Merge_Duplicates\Src
Note: This directory should be created on the machine running the Secure
Agent.
16) Open the file and delete the top 6 lines (so that the header row is the first row),
and save your changes.

Step 3.
Download the workflow xml and import into the Repository
Manager.
1) Go to the class web site.
2) Navigate to the Workflow XML directory and download the following file:
wf_Merge_SF_Leads_Dups.XML.xml
3) Import the xml into your PowerCenter Repository Manager.

Step 4.

Edit the mapplet.

1) Open the mapplet, mplt_Merge_Lead_PC_Mkt, in the Designer tool.


2) Add a Salesforce Merge transformation to the mapplet.

Informatica Cloud Enterprise Lab Guide

55

The Import tables from Salesforce.com dialog is displayed.


3) Enter your Salesforce username and password.
4) Add the Salesforce security token to the end of the password (no space).

5) Click Connect and choose the Lead object to import.


6) Delete the existing Salesforce Merge transformation and map fields to the new
transformation.
7) Validate the mapplet.
8) Save the mapplet.

Step 5.

Validate the mapping.

1) Open the mapping, m_Merge_SF_Leads-Dups.


2) Validate and save the mapping.

Step 6.

Edit the workflow.

1) In the Workflow Manager, click on the Application Connection Browser, and


Select Type: Salesforce Connection.
2) Click New:

3) Enter the username and password:

56

Informatica Cloud Enterprise Lab Guide

4) Click on the session to make sure the correct value is chosen for the Salesforce
Connection.
5) On the Mapping tab, select the mapplet object, and select the correct
connection value:

6)
7)
8)
9)

Click OK.
Click OK again to close.
Validate the workflow.
Save the workflow.

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

Informatica Cloud Enterprise Lab Guide

57

4) Click the New button.


5) Enter SXX_MergeLeads (where XX is your student number) for the plug-in
name.
6) Select True for the Active option.
7) Click the Browse button in the Mapplet XML file that you exported from
PowerCenter.
8) Save the plug-in.

Step 8.

Review data in Salesforce.

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

Step 9.

Create a task to use the plug-in.

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


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

3) Specify the following properties for the task:


o Task Name: SXX_MergeLeads
o Task Operation: Insert
o Source Connection: Flat File
o Source Object: SXX_FindDuplicateLeads_Duplicates.csv
o Target Connection: SXX_Salesforce
o Target Object: Merged_out.csv
4) Add the plug-in, SXX_MergeLeads, on the Field Mapping page.
5) Complete the field mapping.
6) Validate the field mapping.
7) Save and run the task.

Step 10.

Verify results.

1) Check the target file to view a list of merged records.


2) View the leads in Salesforce.
Note that the record with the latest CreateDate is the master and the slave
record has been purged automatically.

58

Informatica Cloud Enterprise Lab Guide

Module 8 Lab 1: 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

59

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.

60

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.
3) Select the login operation:

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

Informatica Cloud Enterprise Lab Guide

61

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:

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:

62

Informatica Cloud Enterprise Lab Guide

16)
17)
18)
19)

Click OK.
Save changes.
Close the XML Schema Navigator window.
Map fields from the Expression transformation to the Web Services
Consumer transformation as follows:

20) Save your changes.


21) Map fields from the Web Services Consumer tranformation to the Output
transformation as follows:

Informatica Cloud Enterprise Lab Guide

63

22) Save the mapplet.

Step 7.

Validate and save the mapping.

1) Open the mapping, m_SalesForce_Login in the Designer tool.


2) Validate and save the mapping.

Step 8.
Validate and run the workflow.
1) Open the workflow, wf_m_SalesForce_Login.
2) Edit the workflow and edit the Source and Target file properties on the
Mapping tab.
3) Save your changes.

4) Validate and run the workflow.


5) Verify results by examining the output file that was created.
Step 9.
Export the workflow and create a Plug-in.
1) Export the workflow.
2) Log into the Informatica Cloud training org, using the username and password
that were provided to you.
3) Go to the Configuration > Plug-ins page.
4) Click the New button.
5) 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.

64

Create new Informatica Cloud flat file connections.

Informatica Cloud Enterprise Lab Guide

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.

Create a data synchronization task.


Create a data synchronization task.
Name the task SXX_SFDC_Login.
Select Insert for the Operation.
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:

Step 11.
1)
2)
3)
4)

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.

Informatica Cloud Enterprise Lab Guide

65

Module 7 Lab 2: 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.
66

Informatica Cloud Enterprise Lab Guide

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)
2)
3)
4)
5)

Open the PowerCenter Designer application.


Open the mapplet, mplt_SFDC_ConvertLead, in the Mapplet Designer tool.
Open the Expression transformation.
Note the Serial_Num field.
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.
1)
2)
3)
4)

Step 8.

Run the workflow and verify results.


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

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.

Informatica Cloud Enterprise Lab Guide

67

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.
1)
2)
3)
4)

Create a data synchronization task.


Create a data synchronization task.
Name the task SXX_SFDC_ConvertLead.
Select Insert for the Operation.
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.

68

Informatica Cloud Enterprise Lab Guide

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

Informatica Cloud Enterprise Lab Guide

69

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

Create a data synchronization task.


Create a data synchronization task.
Name the task SXX_SFDC_Logout.
Select Insert for the Operation.
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:

Step 6.
1)
2)
3)
4)

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.

70

Informatica Cloud Enterprise Lab Guide

Step 7.
1)
2)
3)
4)
5)

Create task flow.


Add all three tasks to a task flow.
Create/edit lead(s) in Salesforce and note SF ID(s).
Update the source file.
Run the task flow.
Verify results.

Module 8 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.
1)
2)
3)
4)
5)

Review the Informatica Cloud REST API documentation.


Open the Informatica Cloud online help.
In the Table of Contents, click on the Informatica Cloud REST API link.
Click on the login link.
Review the documentation for the resource.
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

Informatica Cloud Enterprise Lab Guide

71

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.
1)
2)
3)
4)
5)
6)
7)

Step 5.

Download the credentials source file.


Create a new subdirectory under c:\a_IOD\Files called ICS_API.
Create a Src subdirectory.
Go to the Training web site and navigate to the Source Files directory.
Download the file, Src_ICS_User_Cred.csv.
Save it to the directory you created.
Edit the file and enter your Informatica Cloud username and password.
Save and close the file.

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:

72

Informatica Cloud Enterprise Lab Guide

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:

Informatica Cloud Enterprise Lab Guide

73

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.

74

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

75

Module 8 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.
1)
2)
3)
4)
5)

Review the Informatica Cloud REST API documentation.


Open the Informatica Cloud online help.
In the Table of Contents, click on the Informatica Cloud REST API link.
Click on the activitylog link.
Review the documentation for the resource.
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>

76

Informatica Cloud Enterprise Lab Guide

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

Informatica Cloud Enterprise Lab Guide

77

4) Open the last expression transformation.


5) Examine the Seq_v port.
6) What is the purpose of this port?
________________________________________________________

Step 7.
1)
2)
3)
4)

Step 8.

Use the Target Designer tool to create a target definition.


In PowerCenter Designer, open the Target Analyzer tool.
From the Target menu, select Import from File .
Locate the file you downloaded in the previous step and select it.
Save your changes.

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:

78

Informatica Cloud Enterprise Lab Guide

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.

Create a data synchronization task.


Create a data synchronization task.
Name the task SXX_ICS_API_ActivityLog.
Select Insert for the Operation.
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:

Step 13.
1)
2)
3)
4)

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

Informatica Cloud Enterprise Lab Guide

79

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.

80

Informatica Cloud Enterprise Lab Guide

Module 8 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
Learn how
Learn how
Learn how

to build a plug-in that calls a web service method (via REST API).
to use the runjob resource in the Informatica Cloud REST API.
to create an APEX class.
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.
Name the task: SXX_ProcessOrders.
Select Operation: Upsert.
Select Source Connection: SXX_SFDCDeveloper.
Select (Multiple) Source Objects: Opportunity and Account.
Select Target Connection: Lab SQLServer.
Select Target Object: ProcessOrders.
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
1)
2)
3)
4)
5)
6)
7)

Informatica Cloud Enterprise Lab Guide

81

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, 'UTF8')+
'&jobName='+EncodingUtil.urlEncode(jobName, 'UTF-8')+
'&jobType='+EncodingUtil.urlEncode(jobType, 'UTF8'));
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:

82

Informatica Cloud Enterprise Lab Guide

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','password,'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.

Informatica Cloud Enterprise Lab Guide

83

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.

84

Informatica Cloud Enterprise Lab Guide

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.

Informatica Cloud Enterprise Lab Guide

85

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.

86

Informatica Cloud Enterprise Lab Guide

2) Locate the email from support@salesforce.com.


3) Copy your security token:

Step 3.
1)
2)
3)
4)

5)
6)
7)
8)
9)
10)
11)

Create a Salesforce.com connection.


Go back to Informatica Cloud.
Click on the Configuration tab.
Click on Connections.
Click the New button:

The New Connection page is displayed.


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

Informatica Cloud Enterprise Lab Guide

87

You should see a message that the test was successful.


12) Click OK.

Appendix B Creating an External ID field in


Salesforce
Instructions
1)
2)
3)
4)
5)

Log in to Salesforce.com (use your developer login).


Click Setup.
Click App Setup -> Customize -> Accounts.
Click on Fields.
Click New in the Account Custom Fields & Relationships section:

6) Select Text for the field type.


7) Click Next:

88

Informatica Cloud Enterprise Lab Guide

8)
9)
10)
11)

Enter Account External ID in the Name field.


Enter 150 in the Length field.
Select the External ID checkbox.
Click Next:

12) Click Next.


13) Click Save.

Informatica Cloud Enterprise Lab Guide

89

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.

90

Informatica Cloud Enterprise Lab Guide

You might also like