Articles in this section
Category / Section

How Connect to MongoDB using MongoDB BI Connector and MySQL

Published:

This article will guide you on how to connect to a MongoDB server using the MongoDB BI Connector and MySQL in Bold BI.

Prerequisites

Steps to Connect MongoDB using BI Connector

Step 1: Configure the MongoDB BI Connector

  1. Open the command prompt and navigate to the MongoDB BI Connector installation path:
CD C:\Program Files\MongoDB\Connector for BI\2.14\bin
  1. Use the following command to connect the database and collection in MongoDB:
  • To sample data from one collection in a database named sampled:
mongosqld --sampleNamespaces sampled
  • To sample data from all collections in a database named orders, as well as the FY2015 and FY2016 collections from the expenses database:
mongosqld --sampleNamespaces 'orders.*' \
          --sampleNamespaces expenses.FY2015 \
          --sampleNamespaces expenses.FY2016 \

After connecting your BI connector with the MongoDB server successfully, you will get the list of available schemas in your server.

image.png

You will also get the Server name and Port No from the response: waiting for connections at 127.0.0.1:3307

Step 2: Connect to MySQL Data Source

  1. Select the MySQL data source in the connection panel.

    image.png

  2. Provide the MongoDB BI Connector details in the MySQL data source. Choose the configured database and collection from the list and enter the credentials. Click Connect.

    image.png

Your database and collections from MongoDB will now be available in Bold BI. This is a direct connection from MongoDB.

Step 3: Drag and Drop Collection and Save the Data Source

Drag and drop the collection and save the data source.

image.png

NOTE: Ensure that the MongoDB BI connector is reachable from outside networks and there are no firewall rules that block the connection.

Additional References

Was this article useful?
Like
Dislike
Help us improve this page
Please provide feedback or comments
RM
Written by Reethika Moovendhan
Updated
Comments (0)
Please  to leave a comment
Access denied
Access denied