How do i add multiple records in a single api call via the bulk api using the databasedotcom gem ? right now i using the normal activerecord type methods to insert which takes one api call per record

- 398,270
- 210
- 566
- 880

- 905
- 1
- 10
- 25
-
bulkAPI is well documented (http://www.salesforce.com/us/developer/docs/api_asynch/), are you having some problems with it? – mmix Feb 15 '12 at 11:19
4 Answers
The databasedotcom gem does not support bulk API as it is just a wrapper for the SFDC REST API Check here: https://github.com/heroku/databasedotcom/issues/50
You will have to implement Bulk API on your own, I could not find any ruby gem for it. Here is the reference http://www.salesforce.com/us/developer/docs/api_asynch/

- 1,149
- 9
- 14
I just came across the salesforce_bulk gem that is used for Bulk API calls. Here is an article on how to use it: http://wiki.developerforce.com/page/Accessing_Salesforce_Data_From_Ruby

- 36
- 1
-
salesforce_bulk gem is not updated and compulsory uses usoername password combo for authentication. Instead i have re written the same gem which uses all authentication method with governor limits.https://github.com/yatishmehta27/salesforce_bulk_api – yatish mehta Apr 13 '12 at 08:40
Get records from SFDC.
rails generate scaffold_controller Account Name:String
Gemfile
gem "databasedotcom"
gem "databasedotcom-rails"
create databasedotcom.yml
//Create remote access in SFDC
client_id:
client_secret:
username:
password:
host: login.salesforce.com debugging: true version: 25.0delete public/index.html
routes.rb
root :to "accounts#index"
resources :accounts
controllers/accounts_controller.rb
include Databasedotcom::Rails::Controller
change
"account.destroy"
to"account.delete"
create @account['OwnerId'] = '00590000000pQOL'
(required field)Remove
.error
in views/_form.html.erb

- 281
- 3
- 6
-
It s doesnt use the bulk api .. hence using Databasedotcom gem will finish ur governor limits – yatish mehta Sep 03 '12 at 14:21
-
Can this be formatted (e.g. with sample code) and fleshed out a little? That would make it more useful to people who find this question via search, if it's actually effective. – pjmorse Sep 23 '12 at 00:33