Setup MongoDB connection with Cosmos DB and pass data to PowerBi online thhrough vnet gateway

Alan Pitthan 40 Reputation points
2023-05-23T13:45:16.17+00:00

I have a task to refresh the datasets on Power BI online with up-to-date data, which is stored in MongoDB. The way I thought this would work was to use Azure Cosmos DB as an intermediate between Mongo and PBI, with a data connection between Mongo and Cosmos and then configuring a vnet gateway on PBI using vnets setup on Cosmos, so the data would flow between both ends and the pbi reports would be updated. Additionally, I am using Power BI Embedded to embed the reports on a webapp pages.

I have created a free trial account for Cosmos DB to start working with that, but the capabilities are very limited regarding the connection with Mongo. However, I don't want to risk unnecessary costs by doing the wrong setup and I'm not even 100% sure if this setup would actually work to achieve my goal.

In this sense, I am looking for assistance on how to do this setup and possible workarounds to achieve the same goal.
Thank you,

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,693 questions
0 comments No comments
{count} votes

Accepted answer
  1. Oury Ba-MSFT 19,801 Reputation points Microsoft Employee
    2023-05-23T21:14:48.99+00:00

    Alan Pitthan Thank you for reaching out.

    My understanding is that you are trying to build a connection between Mongo and Cosmos then configure a Vnet gateway and build a Power BI to create a data flow from both ends and make a refresh live data on PBI reports. Please let me know if my understand is not correct.

    "However, I don't want to risk unnecessary costs by doing the wrong setup and I'm not even 100% sure if this setup would actually work to achieve my goal".

    It will work for your scenario.

    You can use Azure cosmos DB as an intermediate between mongo DB and PBI. Once the data is in sync between Mongo DB and Azure cosmos DB then you can set up Synapse link on the Azure cosmos DB to see the real time data.

    for synapse, we can use either Azure SQL or on-prem SQL to setup the synapse link. (Real time data)

     https://learn.microsoft.com/en-us/azure/synapse-analytics/synapse-link/sql-synapse-link-overview

    Important Note!!!!!: The PBI portal experience isn't there for mongo yet. So, just follow the instructions not using the portal experience.

    Enabling Azure Synapse Link has cost implications. See Azure Synapse Link pricing section for more details.

    When to use Azure Synapse Link for Azure Cosmos DB?

    There is a great demo on YouTube by Our Azure Cosmos DB product group on how to use the Azure Synapse link for Azure Cosmos DB to see real time data in Power BI. https://www.youtube.com/watch?v=U6K9P-1snd0

    Currently you can't enable Synapse Link on your existing MongoDB API containers. Synapse Link can be enabled on newly created Mongo DB containers.

    Please let me know if that answers your question.

    If it does, please don't forget to mark as accept answer. This will be useful for others community members with similar ask.

    Another example here but with python in case you want to explore https://github.com/Azure-Samples/Synapse/blob/main/Notebooks/PySpark/Synapse%20Link%20for%20Cosmos%20DB%20samples/E-Commerce/spark-notebooks/pyspark/01-CosmosDBSynapseMongoDB.ipynb

    Regards,

    Oury


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.