Sunday, June 6, 2021

#859 OIC - SFDC -Bulk api








Simple example here - I use the bulk api to load data from an Oracle DB into an SFDC custom object.

Here is my DB table - 





Here is my SFDC custom object -









The integration is simple - 














The SFDC invoke is configured as follows - 










Here is the content of the DB table - 






Activate and test - review in SFDC - 



















The job stays here - remaining in progress.

I need to revisit the integration and add the following invoke to SFDC - 






 











Activate and Test - 














Now let's look at the response from CompleteBulkLoad shown above - 












2 records failed - now this is because I have already done a successful import for these 2 rows - 

I check in SFDC - 










The job is completed, but failed for the aforementioned reason.

I update the DB rows and re-test - 





















Naturally, I can also model the integration as follows, i.e. without the loop -


 












The Map to BulkLoadCustomObject is then as follows - 












I update the DB rows to ensure no duplicates on load - 


 







I activate and test the integration - 










Leveraging UPSERT option

Ensure the SFDC custom object has a field with the following box checked - External Id

































I need to map an extra field, apart from my 4 fields - 










I set this to the external id field name, concatenated with an empty string e.g.
concat ("field1Required__c", "" )

Activate, test -







































No comments: