Gem to perform data uploads using the Salesforce Bulk API. This library is only intended to support the bulk API, so salesforce authentication will need to be handled independently (we use the databasedotcom gem)
Add this line to your application's Gemfile:
gem 'salesforce_bulk_client'
And then execute:
$ bundle
Or install it yourself as:
$ gem install salesforce_bulk_client
A simplistic usage example of usage is below.
connection = SalesforceBulkClient::Connection.new(instance_host, salesforce_client.oauth_token)
api = SalesforceBulkClient::Api.new('23.0')
job = SalesforceBulkClient::Job.new(api, connection)
job.create('upsert', 'Account', 'SomeExternalId')
job.add_batch(<array of hashes>)
job.close
job.update_batches
if (job.all_batches_completed?)
batch_results = job.all_batch_results[:batches][0]
- Fork it ( http://github.com//salesforce_bulk_client/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request