Skip to content

Commit

Permalink
add brief description about how to use bulk job controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Weiss committed Jul 12, 2016
1 parent 4cac366 commit b7210be
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,26 @@ This can also be invoked automatically by adding Forcex to your project's compil
compilers: [:forcex] ++ Mix.compilers,
```

## Bulk API Usage

Forcex has an example Bulk API query job controller. Here's roughly how that can
work.

```elixir
client = Forcex.Bulk.Client.login
[
"Account",
"Campaign",
"Contact",
"Lead",
"Opportunity",
"OpportunityLineItem",
]
|> Enum.map(fn sobject -> {sobject, ["select Id, Name from #{sobject}"]} end)
|> Enum.map(fn {sobject, queries} ->
Forcex.Bulk.JobController.start_link({:query, sobject, queries, client}) end)
```

## Configuration

The `Forcex.Client` is configured to read login information either from
Expand Down

0 comments on commit b7210be

Please sign in to comment.