Working with MongoDB data source
QMF supports MongoDB as a read only database. You will be able to query MongoDB from QMF.
About this task
QMF accesses MongoDB using MongoDB connector for BI. MongoDB connector for BI needs to be connected to the MongoDB server which converts JSON documents from MongoDB to relational schema. QMF establishes JDBC connection to MySQL client and MySQL client connects to the MongoDB Connector for BI.
Pr-requisites
- For on Premise, use MongoDB 4.4
- BI Connector 2.14
- MySQL 5.7.X
- 5.X version of JDBC driver to connect to QMF (mysqlconnector-java-5.1.39.jar)
Configuring MongoDB for Windows
To configure the environment for MongoDB data source for Windows, perform the following steps:
-
Start the Mongo Db server.
mongod.exe --dbpath="<mongodb_path>" --bind_ip_all --port <mongo_port>
-
Start the MongoDB BI Connector.
mongosqld.exe --config <path_to_mongosqld.conf>
-
Start MySQL as a service.
mysqld.exe --defaults-file=<path_to_my.ini> MYSQL57
-
Start MYSQL client which listens to the data being transferred from BI Connector in step 2.
mysql.exe --defaults-file="<path_to_ini>" --protocol tcp --port 3307
Configuring MongoDB for SUSE Linux
-
Start the Mongo Server.
systemctl start mongod
-
Check the server status.
systemctl status mongod
-
Enable Mongo server restart following a system reboot.
systemctl enable mongod
-
Connect to a Mongo Client to see the database tables.
-
Start the MongoDB BI Connector.
mongosql --config <path_to_mongosqld.conf>
-
To start MYSQL service.
systemctl start mysqld
-
Start MySQL Client which listens to the data being transferred from the already running BI Connector.
mysql --defaults-file --protocol tcp --port 3307
After configuring MongoDB, you should be able to add MongoDB as a relational data source.