Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
shankarsgs
Contributor

SAP has announced partnership with MongoDB recently at SAPPHIRE. The next version of SAP Lumira would have connectivity with MongoDB. For the current version, there are two ways by which MongoDB can be connected with SAP Lumira. This blog is about one of the ways to connect, using Odata.

OData connectivity with SAP Lumira

SAP Lumira can fetch and process data from an OData feed by using the open OData 2.0 driver provided along with it. By exposing MongoDB collections as OData, the same can be consumed by Lumira for visualization. The OData feeds update as the documents in the collection update. This is a generic way.

MongoDB as OData

Windows Communication Service (WCF) is a framework for building service-oriented applications. It can define endpoint as MongoDB and expose them as OData, which then can be used in any applications that can work on OData. MongoDB driver for .NET is used to make the web application communicate with MongoDB and pull the data out. MongoDB service should be running throughout the process.

A blank .NET 4.0 MVC web application (solution) is created in Visual Studio and by using NuGet packet manager, the driver and the web service for MongoDB is added to the solution as a source package. The NuGet console can be accessed by


Tools->NuGet package Manager->Package Manager Console.


If the NuGet package manager is missing, it can be installed in the Extensions manager in Tools menu.

The command Install-Package MongOData executed on the NuGet console downloads and adds the files to the blank solution.

 

             Web.config holds the configuration information for the connectivity options to MongoDB. The connection string is updated with the URL of MongoDB                Database.

Web.Config Database Connection
<add name="MongoDB" connectionString="mongodb://localhost/TESLA"/>


The format for connectionString is mongodb://<hostname>:<port>/<db> The port can be omitted if instance is running on default port. The application can be published to IIS or can be executed on the local development server. MongoDataService.svc is the end point for OData and it can be opened in browser to view the collections of the database as OData.

The Generic OData 2.0 source is selected in Lumira. The OData URL is then used and Lumira displays the list of collections in the particular Database in MongoDB.


Additional details like Username, password and proxy information are optional and can be skipped for default configurations of MongoDB.

The Storyboard can then be built from the Data available from the collection that was imported.

OData using Node.js

For MongoDB running on other platforms, the same can be achieved by using OData server in nodejs and exposing MongoDB collections as OData and consuming the same in Lumira.

Conclusion

                OData can be used as the service medium for connecting SAP Lumira and MongoDB. Next series of the blog would be about using JDBC to connect Lumira and MongoDB.

Happy Visualizing !

Posted originally on http://www.visualbis.com/blogs/sap-lumira/2014/06/24/connecting-sap-lumira-with-mongodb-part-1/

2 Comments
Labels in this area