It is possible to visualize data from MongoDB using Targetprocess Visual Reports.
Using MongoDB App
-
Setup account
Start with creating a new report, select MongoDB app, provide the name of connection and connection string to MongoDB. You can read more about connection string here.
-
Configure data settings using MongoDB collection source type
Select the collection source type if the count of records is supposed to be less than 200,000. It is possible to limit the count of retrieved rows using a Query, Sort and Limit options.We have imported Stocks Dataset to "stocks" MongoDB collection for this example.
-
Create the chart for retrieved collection
-
Configure data settings using MongoDB aggregation pipeline source type
Alternatively, you can use Aggregation Pipeline option to build the same chart. It is useful when count of records is bigger than 200,000. It can be a bit complex since it requires knowledge on how MongoDB aggregation pipeline works, read more about that here. In this example we use a GUI client - MongoHub here - to create and test pipeline before pasting it into the source form. But it is not necessary if you are MongoDB pro.
[ { $group : { _id : { company: "$company", date: "$date"}, price: { $sum: "$price" } } }, { $project: { _id: { $concat: ["$_id.company", "-", "$_id.date"] }, company: "$_id.company", date: "$_id.date", price: "$price" } } ]
Still have a question?
We're here to help! Just contact our friendly support team