[Feature Request]: Add hint to ReadFromMongoDB, MongoDBIO Connector
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
### What would you like to happen?
I am using the MongoDBIO Connector to extract MongoDB data using Google Dataflow. There is a specific collection I have that is very large, and I am using the `filter` option in the connector in order to only get the latest data in each iteration (filtering by the updatedAt attribute).
The current issue is that the calls to extract the data are not very efficient, because my Disk Utilization goes above threshold when performing the operations. I created the index: `{_id: 1, updatedAt: -1}` and that solved the Query Targeting problem, but there are still commands that have an Examined:Returned ratio in the thousands while also having a very high operation execution time (in the hundreds of thousands).
From what I understand, a `hint` can be added to the aggregationPipeline in order to help the queries/commands. This would complement the `filter` option that is currently available.
### Issue Priority
Priority: 3 (nice-to-have improvement)
### Issue Components
- [X] Component: Python SDK
- [ ] Component: Java SDK
- [ ] Component: Go SDK
- [ ] Component: Typescript SDK
- [X] Component: IO connector
- [ ] Component: Beam examples
- [ ] Component: Beam playground
- [ ] Component: Beam katas
- [ ] Component: Website
- [ ] Component: Spark Runner
- [ ] Component: Flink Runner
- [ ] Component: Samza Runner
- [ ] Component: Twister2 Runner
- [ ] Component: Hazelcast Jet Runner
- [X] Component: Google Cloud Dataflow Runner
Contributor guide
Assessment
This issue has not been assessed yet.