Vous êtes sur la page 1sur 8

Informatica Cloud Services On-Demand Training Module 7 Lab Exercises

Informatica Cloud Services On-Demand Training

Module 7 Lab 1: Using Data Filters and Field Expressions


Scenario: You will import leads from a CSV file into Salesforce. In the import file, there is a field called FullName that contains the leads name which can include salutation, first name, last name, middle initials, and suffix. You want to extract the first and last name so they can be inserted separately into these fields in SFDC. Note that there are also some leads in the file that you would like to exclude from the import. In this case, you dont want to import any leads where the Company Name is Company Z or the email address is blank. Goals: In this lab, you will: Practice creating a data synchronization task. Practice adding a field expression. Practice using a data filter. Duration: This lab should take approximately 15 minutes.

Instructions
1. Copy source file.
Copy the file, Leads.csv (included in the zip file) to the c:\ICSLabFiles directory you created for this class.

2. Create a new data synchronization task.


1) 2) 3) 4) 5) 6) Name the task LoadLeads. Select Insert for the Operation. Select LocalCSVFiles for the Source Connection. Select Leads.csv for the Source Object. Select SFDCDeveloper for the Target Connection. Select Lead for the Target Object.

Informatica Cloud Services On-Demand Training

3. Define Data Filters (step 4 of wizard).


1) In the Data Filters section, click the New button.

The Advanced Data Filter window is displayed. 2) Select Leads.csv from the Object list. 3) Enter the following expression in the Filter Expression field: (Company_Name != 'Company Z') AND (Email != '') 4) Click OK.

4. Go to community site and find expression for splitting contact name.


1) Go to the Informatica Cloud community site: community.informatica.com. 2) Click on Informatica Cloud in the Product Communities list. 3) Click on Advanced Expression Examples in the Informatica Categories section. 4) Find the document titled Using an Expression to Split Contact Name. 5) You can copy and paste these expressions into the appropriate fields.

5. Specify field mappings (and expression).


1) Map the following fields: Source Field Company_Name Full_Name Full_Name Mailing_City Mailing_Country Mailing_State_Province Target Field Company FirstName LastName City Country State

Informatica Cloud Services On-Demand Training

Mailing_Street Street Mailing_Zip_Postal_Code Postal Code Mobile MobilePhone Source LeadSource 2) Add the expression to the Target FirstName field by clicking on the Expression icon:

3) Copy and paste the expression for First Name from the community site into the Expression field:

What do you think this expression does? Can you break it apart into the different nested functions? (HINT: Refer to the online help). What if there is more than one space in the FULL_NAME? 4) Click Validate to validate the syntax. 5) Click OK to save the expression:

Informatica Cloud Services On-Demand Training

6) Copy and paste the expression for Last Name from the community site into the Expression field:

How is this expression different from the expression used to find the first name? 7) Validate the expression. 8) Click OK. 9) Validate the mapping.

6. Save and run the task.


1) Click Save. 2) Locate the LoadLeads task in the Task List. 3) Run the task. The task should return 7 success rows.

7. Examine the results.


Examine the source file (Leads.csv). How many records are in the file? Why were the other records excluded? Verify that the leads were added to Salesforce and that the First and Last Name fields were populated correctly.

Informatica Cloud Services On-Demand Training

Module 7 Lab 3: Incremental Processing


Scenario: You will create a data synchronization task that writes account data from Salesforce to a flat file. You want to add a filter to the task so that it only processes data that has changed since the last time the task was run. Goals: In this lab, you will practice using the $lastruntime variable in a data filter to do incremental processing. Duration: This lab should take approximately 10 minutes.

Instructions
1. Create a new data synchronization task.
1) 2) 3) 4) 5) 6) 7) 8) Name the task Incremental. Select Insert for the Operation. Select SFDCDeveloper for the Source Connection. Select Account for the Source Object. Select LocalCSVFiles for the Target Connection. Click the Create Target button. In the File Name field, enter the name IncrementalAccounts.csv. Click OK.

2. Add a new data filter.


1) Click Next to go to Step 4 of the wizard. 2) In the Data Filters section, click New. The Data Filter window is displayed. 3) Select Account from the Object list. 4) Select LastModifiedDate from the Filter by list. 5) Select Greater Than or Equals from the operator list. 6) Enter $lastruntime in the last field. 7) Click OK:

8) Click Next.

3. Specify field mappings.


All fields should be auto-mapped by Informatica Cloud. If the fields are not automatically matched, click the Automatch button.

4. Save and run the task.

Informatica Cloud Services On-Demand Training

1) Save the task. 2) Run the task. Note that the task should return success rows this number will vary according to the number of account records you have in Salesforce. When the task is run successfully, the $lastruntime variable is assigned a value.

5. Re-run the task.


1) Run the task again. 2) Note the number of success rows. Note that, this time, the task should return 0 success rows, as no account records have been changed in Salesforce.

6. Change one or more account records in Salesforce.


1) Log into Salesforce. 2) Click on the Accounts tab. 3) Click into the Details page for an account. Change some of the Account details name or phone number, for example. 4) Save your changes.

7. Run the task again.


Run the task. Note that the task should return one success row for each account record that you changed in Salesforce.

Informatica Cloud Services On-Demand Training

Module 7 Lab 3 Adding a Field Expression


Scenario: You will add go back and add a field expression to a data synchronization task you created in an earlier Unit. The goal of this expression will be to format a phone number so that it contains parentheses around the area code as well as all necessary spaces. Goals: In this lab, you will: Practice adding an expression to a task. Practice using the expression editor. Duration This lab should take approximately 5 minutes.

Instructions
1. Examine the existing data in Salesforce.
1) Log into Salesforce. 2) Search for the account Tyco. 3) Examine the format of the phone number.

2. Edit the task.


1) Locate and edit the UpsertAccounts task you created in an earlier unit. 2) Go to the Field Mapping step of the wizard,. 3) Add an expression that will format the phone number field using the following convention: (xxx) xxx-xxxx Hint: Use double bar as shorthand for concatenate and use single quotes around static (non-changing) fields like spaces and parenthesis.

3. Save and run the task.


1) Save the task. 2) Run the task.

4. Examine the results.


1) Log into Salesforce. 2) Search for the account Tyco. 3) Examine the format of the phone number.

Informatica Cloud Services On-Demand Training

Vous aimerez peut-être aussi