Wednesday, 6 March 2019

OBIEE 11g Integration with MongoDB (Star Schema in OBIEE)

OBIEE does not have inbuilt functionality to directly connect with MongoDB, so it requires API/JDBC/ODBC for integration.

After evaluating a couple of ODBC drivers, I have decided to use the Simba ODBC driver. The Simba ODBC driver for MongoDB is standard database driver that can integrate real-time access to MongoDB data.

ODBC Driver with SQL Connector

Simba’s ODBC connector allows you to make quick analytic insights and to leverage back end data source high-performance calculation capabilities for OBIEE. Since MongoDB is schema-less, a powerful mechanism within the SQL Connector allows users to define schemas on the fly for use by the ODBC 3.8 driver, providing a powerful SQL window to MongoDB data.

The OBIEE can easily connect and quickly deliver performance and broad compatibility and ensure full functionality for users analyzing and reporting on MongoDB.

                                              

Installing the driver


Windows Driver

System Requirements

Each computer where you install the driver must meet the following minimum system requirements:
• One of the following operating systems (32- and 64-bit editions are supported):
• Windows XP with SP3
• Windows Vista
• Windows 7 Professional
• Windows Server 2008 R2
• 25 MB of available disk space

Important: To install the driver, you need Administrator privileges on the system

On 64-bit Windows operating systems, you can execute 32- and 64-bit applications transparently.
You must use the version of the driver matching the bitness of the client application accessing data in MongoDB databases:

·         SimbaMongoDBODBC32.msi
·         SimbaMongoDBODBC64.msi

You can install both versions of the driver on the same computer.


Steps to Install Simba ODBC Driver

1.         Depending on the bitness of your client application, double-click to run SimbaMongoDBODBC32.msi or SimbaMongoDBODBC64.msi.




The Simba MongoDB ODBC Driver Setup window opens and Click Next.

 Select the checkbox to accept the terms of the License Agreement, and thenClick Next


Click Next. The Ready to install Simba MongoDB ODBC Driver page is displayed.

          Click Install.

When the installation completes, click Finish

6.      If you received a license file via e-mail, then copy the license file into the \lib subfolder in the installation folder.


Creating User in MongoDB


MongoDB Shell (mongo)

You can use the mongo shell to query and update data as well as perform administrative operations.
Start mongoDB
Once you have installed and have started MongoDB, connect the mongo shell to your running MongoDB instance. Ensure that MongoDB is running before attempting to launch the mongo shell.
Note:- If it has not started then start the mongoDb.
 To Start Mongo DB navigate to bin/ and launch the mongod.exe


On the same system where the MongoDB is running, open a terminal window (or a command prompt for Windows) and run the mongo shell with the following command:
Mongo.exe



Add a user on MongoDB database
Add a user with the userAdminAnyDatabase role. 
Syntax:-
use admin
db.createUser(
  {
    user: "MyDB1",
    pwd: "abc123",
    roles: [ { role: "userAdminAnyDatabase", db: "admin" } ]  } )
  


Load data into the database
Mongoimport
The mongoimport tool imports content from an Extended JSON, CSV, or TSV export created by mongoexport, or potentially, another third-party export tool.
Syntax:-
Run below command if you are importing data remotely
mongoimport --host mprmana01 --port 27017 --username Mydb --password abc123 --collection contacts --db json1 --file c:/json1.json

Run below command, In case of localhost (Where MongoDB installed)
mongoimport --db mydb1 --collection data --file c:/data.json

Insert Data with the mongo Shell

You can use the insert() method to add documents to a collection in MongoDB. If you attempt to add documents to a collection that does not exist, MongoDB will create the collection for you.

Insert a Document

Insert a document into a collection named restaurants. The operation will create the collection if the collection does not currently exist.

Example:-

  db.custDetails.insert:(
    {
      "indvCorpFlag": "C",
      "customerID": "99122850",
      "existingCustomerID": "",
      "tinNo": "",
      "companyName": "purna",
      "custSegment": "11",
      "natureBusiness": "85_NOB",
      "groupID": "G00000000000021",
      "typeOrganization": "",
      "industry": 2,
      "hostAccountNo": "",
      "registrationNo": "",
      "dateOfInception": "27-09-2015",
      "yearOfBusinessInCountry": 23,
      "tradeLicenceExpiryDate": "",
      "contactPerson": "asdfghjkllk",
      "designation": "",
      "entityFlag": "Y",
      "ncrNo": "",
      "companyBusiness": "",
      "cifID": "",
      "constitutionId": "13",
      "turnover": "" })

Creating a Data Source Name


After installing Simba ODBC Driver with SQL Connector and importing data into mongodb, you need to create a Data Source Name (DSN).

To create a Data Source Name:
1.       Now go to Control panelà Administrative tool àData source(ODBC)
2.       Click on System DSN tab


 Click the Drivers tab and verify that the Simba MongoDB ODBC Driver is displayed in the list of ODBC drivers that are installed on your system.

 In the Data Source Name text box, type a name for your DSN.

5.       Click then test to make sure ODBC connected the other database.

Connecting Mongodb to OBIEE 11g

1.       Now go to obiee11g  --> In that select the database as ODBC

 

2.       Create a connection pool for that database


3.       Now you can Import that tables from Mongodb


   

Data Modeling





OBIEE Dashboard



 

 



 

Friday, 1 March 2019

Power BI vs Tableau