Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix example in README.md

  • Loading branch information...
commit accbca6c9664dec2f3804262f5905d95f0d1315c 1 parent 4d3f5b5
@stomita authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 README.md
View
9 README.md
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.