Working with NoSQL — Visualizing using PowerBI
2 min readAug 16, 2019
Visualization tools such as PowerBI are very easy to work with and can be used to create stunning reports, but are mostly used with structured databases. However, they can perform the same functionality even with NoSQL databases, which is what I felt needs to be written down somewhere on the internet and am going to cover in this short tutorial. I'm going to stick to MongoDB as it is the most popular NoSQL implementation. Make sure to get its connector here.
Let’s get started!
- In a command prompt window, start
mongo
, which is in thebin
folder for theServer
. Hittingshow dbs
should give you a list of databases
- Next, start
mongosqld
, which should give you an IP address and port number
- Go to
ODBC Data Sources Administrator
in your Windows start menu and create a newSystem DSN
- Use the MongoDB Unicode Driver
- Provide a Data Source Name to identify
- Set the IP and port number the same as in the previous step
- Select the database from the dropdown. If not, just enter the name of your DB
- Use the following code snippet in
mongo
to create a user. Change credentials as required.
db.createUser({
user: “user”,
pwd: “123”,
roles:[{role:”readWrite”,db: “test”}]
})
- Open PowerBI and click the
Get Data
option. SelectODBC
from the search and connect. Select the Data Source from the dropdown and click OK.
- Use the same credentials which you did while creating the user.
- You should now see your DB. Select the appropriate documents(tables) for visualization
Happy Visualizing!
Many thanks to this video for finally showing me how it is done.