Details
-
Improvement
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
2.9.0
Description
Adds Support to Limit Results
MongoDbIO.read() .withUri("mongodb://localhost:" + port) .withDatabase(DATABASE) .withCollection(COLLECTION) .withFilter("{\"scientist\":\"Einstein\"}") .withLimit(5));
Adds Support to Use Aggregates
List<BsonDocument> aggregates = new ArrayList<BsonDocument>(); aggregates.add( new BsonDocument( "$match", new BsonDocument("country", new BsonDocument("$eq", new BsonString("England"))))); PCollection<Document> output = pipeline.apply( MongoDbIO.read() .withUri("mongodb://localhost:" + port) .withDatabase(DATABASE) .withCollection(COLLECTION) .withAggregate(aggregates));
Attachments
Issue Links
- is related to
-
BEAM-12217 MongoDbIO: remove Read.withFilter() and Read.withProjection()
- Triage Needed
- relates to
-
BEAM-4567 Can't use mongo connector with Atlas MongoDB
- Resolved
-
BEAM-6521 Deprecate/Remove MongoDb `withFilter` because its contract is broken
- Open
- links to