Forum Discussion
MongoDB Atlas SQL connection using 2 connections with 1 data gateway problem
- 1 year ago
Hi Anonymous
I contacted Microsoft support and they were helping me, but finally I managed to find a solution with my colleagues. It turns out that it is possible to create a kind of ‘view’ in a section that Mongo Atlas offers called Data Federation. There I put together both collections, each one from a different cluster and I only needed one connection for both Desktop and Service.
So as this has helped me, I'll give this answer as a solution.
Anyway, thank you very much for the help provided in your comments!
Hi nbustos,
Thanks for reaching out to the Microsoft fabric community forum.
Based on what you've described, the issue seems to be related to how Power BI Service handles multiple connections to the same data source (MongoDB Atlas in this case) via ODBC and a gateway.
This behavior isn’t a MongoDB-specific limitation it’s how Power BI handles ODBC and gateway connections in the service. If the connection strings aren’t exactly identical, Power BI sees them as separate and requires separate credential configuration.
In Power BI Desktop, you're able to define separate connections for each collection without issue, but when the report is published, the service expects each unique data source (including different connection strings) to be configured and credentialed individually in the gateway settings.
Please try these steps to fix the issue:
* Go to the Power BI Service -> Manage Gateways. Under your gateway cluster, you should see both connections listed separately, even if they’re pointing to the same MongoDB server, Power BI treats them as separate if their connection strings differ in any way (database name, collection, parameters, etc.).
* Make sure both data sources are configured and credentials are set. For each listed connection click "Edit Credentials" then re-enter the correct authentication details (likely basic or username/password). Make sure privacy level settings are consistent for both connections.
* Verify that your dataset in the workspace is mapped to the correct gateway and both data sources.
I would also take a moment to thank Irah24, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi nbustos,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.