Skip to content
This repository has been archived by the owner on Aug 30, 2018. It is now read-only.

Commit

Permalink
fix example in README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stomita committed Jan 11, 2013
1 parent 4d3f5b5 commit accbca6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Expand Up @@ -551,12 +551,15 @@ conn.sobject('Contact')
.stream().pipe(fs.createWriteStream("Contact.csv"));

// Filter only matching record to pass downstream
var emails = {};
conn.sobject('Lead')
.find({}, { Id: 1, Name: 1 })
.find({}, { Id: 1, Name: 1, Company: 1, Email: 1 })
.pipe(sf.RecordStream.filter(function(r) {
return { ID: r.Id, FULL_NAME: r.Name }
var dup = emails[r.Email];
if (!dup) { emails[r.Email] = true; }
return !dup;
}))
.stream().pipe(fs.createWriteStream("Contact.csv"));
.stream().pipe(fs.createWriteStream("Lead.csv"));
```

### Data Migration using Bulkload Batch Record Stream
Expand Down

0 comments on commit accbca6

Please sign in to comment.