In Part 1 of the series we discussed about using OData to connect Lumira and MongoDB . In the second part of this blog, we will be using JDBC to extract MongoDB data into SAP Lumira.
JDBC is Java Database Connectivity. JDBC’S open connection format is supported by Java to connect to Database and external sources of data. MongoDB provides JDBC drivers to use and connect to it from any external application like Lumira.
Step 1 : Downloading the Driver
The JDBC driver for MongoDB can be downloaded from https://www.unityjdbc.com/. The driver comes with a set of JAR files which can be used as driver.

Step 2 : Installing the driver in SAP Lumira
SAP Lumira has a JDBC Driver source. The driver can be installed in SAP Lumira from the preferences menu – File->Preferences->SQL Drivers

Choose Generic JDBC datasource and click on Install Drivers button and select both mongodb_unityjdbc.jar and mongo-java-driver-2.12.2

Restart Lumira for the driver to install.
Step 3 : Establishing the JDBC Connection
Now that the drivers are installed, JDBC connection can be created to connect to MongoDB by selecting the General JDBC datasource and by providing the necessary connection details

Username and Password is required to access the data through JDBC. For this a normal user with a role to the particular database should be created in MongoDB. The JDBC URL is the url required to access the running instance of MongoDB.
URL: jdbc:mongo://<hostname>:<port>/<db>

Once connected ,the collection is listed and corresponding documents in the collection are displayed as fields. We can now consume this data and build visualizations.


We have seen two options that helps connecting SAP Lumira to MongoDB. JDBC is a better option to connect MongoDB with SAP Lumira mainly due to ease of connectivity and also results in better performance as it connects directly with MongoDB and does not require an intermediate server like OData and is platform independent. In a later release of Lumira, SAP plans to provide direct connectivity options with MongoDB as a collaboration partner.