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

Commit

Permalink
Merge branch 'release/0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
stomita committed Jan 11, 2013
2 parents 3de22a4 + accbca6 commit 34a1950
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
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 34a1950

Please sign in to comment.