Embed Powerful Analytics and Business Intelligence Everywhere

Connect MongoDB Workloads Migrated to Azure Cosmos DB

Connect MongoDB Workloads Migrated to Azure Cosmos DB

Share this blog

Be the first to get updates

    Subscribe RSS feed
    Connect MongoDB Workloads Migrated To Azure Cosmos DB

    Azure Cosmos DB is a fully managed, multi-model database service. A multi-model database is a database that supports multiple APIs and multiple data models. Different APIs use different data formats for storage. Cosmos DB uses a SQL API by default but implements wire protocol for MongoDB, Gremlin, Cassandra, and Azure Table Storage. So, using these APIs, any compatible application can connect to Cosmos DB through its drivers, with the benefit of Cosmos DB’s core features.

    On the other hand, MongoDB is an open-source document database whose documents are like JSON objects. Azure Cosmos DB implements the same wire protocol as MongoDB. We can query Cosmos DB using MongoDB client libraries. In this blog, let’s see how to connect to Azure Cosmos DB using the Bold BI’s MongoDB data connection.

    To connect to Cosmos DB using the MongoDB connector, an Azure Cosmos DB account should be created with the API type of MongoDB from the Azure Portal.


    • As of writing, Cosmos DB has a limitation. The type of API cannot be changed after the Cosmos DB account is created, so we either need to create a new account for a different API type or migrate data into a new database account from an older database account. Data migration steps are provided for each API type for MongoDB.
    • The Azure Cosmos DB’s API for MongoDB is compatible with MongoDB server version 3.2 and 3.6. There are some limitations in query language explained in this documentation.

    Connecting to Cosmos DB from Bold BI

    Bold BI has support to connect to the MongoDB database using the MongoDB connector. As the MongoDB connector uses the MongoDB client library to access the MongoDB database, we can connect to Azure Cosmos DB in Bold BI using the same MongoDB data source connector:

    1. To start with, sign in to your Azure portal account and open your Cosmos DB account.
    2. In the left pane of the account blade, click Connection String. It has all the information necessary to connect to Bold BI using the MongoDB data source, so make note of the host, port, SSL, username, and password.
    3. Open the Bold BI application and navigate to the Data Sources tab in the left pane.
    4. Search for and select the MongoDB connector.
      Choose MongoDB data source
      Choose MongoDB data source
    5. In MongoDB, create a data source dialog and enter a valid name for the data source.
      Create a MongoDB data source
      Create a MongoDB data source
    6. Set the authentication type as SCRAM and enable SSL (if SSL is true in Cosmos DB).
    7. In the Server name field, enter the host value of Cosmos DB, noted from the Azure portal.
    8. Similarly, enter the port, username, and password.
    9. Click on the Database drop-down. It will list all databases in Cosmos DB.
    10. Select one and click Connect. It will list all the tables in MongoDB along with preview data.
    11. Select the required tables and click Connect to extract the required tables into Bold BI.
    12. Once all selected tables are extracted successfully into Bold BI, start designing business dashboards for data in Azure Cosmos DB.


    If you have any questions on this blog, please feel free to post them in the following comment section. Get started with Bold BI by signing up for a free 15-day trial and create more interactive business intelligence dashboards. You can also contact us by submitting your questions through the Bold BI website or, if you already have an account, you can log in to submit your support question.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    Live Chat Icon For mobile
    Hugo Morris

    Chat with the Bold BI Sales team now!

    Live Chat Icon