Thursday, May 4, 2017

Creating a Mapping to do an Update & Insert to Salesforce with ODI12c

In this post, I created a mapping that will do an update and insert to a Salesforce table.

Now to begin, in Designer, expand your project folder and create a new mapping
Enter a name for your Mapping
In Designer > Models accordion, select the necessary tables serving as your source and target object. In the Logical tab of your mapping, drag the tables. Example screenshot below is showing the source table which is in an Oracle database and the target table which is in Salesforce. I have added a filter in this example.
Still in the Logical tab, in the Properties > Target box, select 'Incremental Update' for the Integration Type.
Still in the Logical tab, click the target table. In the Properties > Attributes box, make sure to untick the checkbox for the Salesforce Audit columns (The audit columns are the following: LastModifiedDate, CreatedById, IsDeleted, SystemModstamp, CreatedDate, LastModifiedById. In my example, I have also unchecked OwnerID and Name because they will be automatically assigned values by Salesforce during insert).
In the Physical tab,  in the TARGET_GROUP highlighted, click on the target units. In Properties > Loading Knowledge Module, in the dropdown you either select <Default> or 'LKM SQL Multi-Connect'. 
Still in the Physical tab, click the target table. In Properties > Integration Knowledge Module, in the dropdown select 'IKM SQL to SQL Incremental Update'. For the options, set FLOW_CONTROL and FLOW_TABLE_LOCATION to 'False' and 'STAGING', respectively. I have mentioned this in my previous post that Salesforce cannot be used as a staging location. Please refer to a previous post for more info on which IKMs you can use for Salesforce Integration with ODI12c.
Save your work, execute and verify the data.


5 comments:

Using a Variable to capture Error Messages in ODI12c Load Plans

Create a Variable to hold the Error Message. In this example, I am creating a Global Variable. In the Refreshing tab, enter the follow...