Forum Discussion

raaan12's avatar
raaan12
Frequent Visitor
1 year ago
Solved

Automatically Detect New MongoDB Collections in Power BI

  Hi everyone, I’m working with Power BI and using the MongoDB connector to import my data.  My question is: if a new collection is later added to the MongoDB database, Power BI doesn’t seem to de...
  • rohit1991's avatar
    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.