Forum Discussion
Automatically Detect New MongoDB Collections in Power BI
- 1 year ago
Hi raaan12 ,
In Power BI, when using the MongoDB connector, new collections are not automatically detected or loaded after the initial connection setup. This is because Power BI imports data based on a predefined query or selection made during the initial data load. Power BI does not dynamically scan the MongoDB database schema for changes, such as newly added collections, in subsequent refreshes.
If you want Power BI to include new collections as they are added, you would need to implement a more dynamic data retrieval approach. One workaround is to use Power Query's MongoDB driver with a custom script that queries the database for all collections (using system metadata like db.getCollectionNames() if you're working outside Power BI in an ETL tool or script). However, this isn't directly supported inside Power BI without external scripting (e.g., via Python or a dataflow API integration).
In short, Power BI does not currently support automatic detection and import of new MongoDB collections, and you will need to manually update the data model or use a more flexible ETL process outside of Power BI for dynamic schema changes. Let me know if you’d like help designing an automated process outside Power BI to handle this.
Hi raaan12 ,
Thank you for the helpful response danextian !
To help you connect MongoDB with Power BI and automate your workflows, we’ve pulled together some useful resources. The Power BI REST API docs show how to manage datasets, refreshes, and reports programmatically. If you're using MongoDB, the official connector guide explains how to connect it to Power BI. For automation, this blog post walks through using Power Automate to trigger API actions. Finally, Hevo’s guides break down different connection methods and real-world API use cases.
If this post helps, please give us Kudos and consider Accept it as a solution to help the other members find it more quickly.
Regards,
Sreeteja.
Hi raaan12
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our response has addressed your query, please Accept it as a solution so that other community members can find it easily.
Thank you.