Category / Section
How to query/filter MongoDB collections in Bold BI?
Published:
Currently, we don’t have support to filter/query the MongoDB connector before fetching the data. On the other hand, we can create views in MongoDB with the required filters and use them in Bold BI.
Connecting MongoDB views in the Bold BI:
- Aggregation pipelines can be directly created within the MongoDB server to restrict rows, alter data, and choose particular fields. These pipelines are able to be saved as views, which can then be linked to Bold BI through the MongoDB connector.
Creating Views:
- We can create views in MongoDB and use them in Bold BI.
- To create views in MongoDB Compass, go to Collections -> Aggregations -> Add stage -> Use project stage.
To create a view, right-click on the three dots of the collections, then navigate to the aggregation option and select create view.
In the below image, if you give a stage as a $project, the fields to include or exclude.
If you provide a $match, it will return the input given in the query.
Refer MongoDB Views to learn more about creating Views in MongoDB.
Connect MongoDB Views in Bold BI:
The created views can be found under the Collections list.