How to do reporting with MongoDB?

mpen picture mpen · Jan 11, 2013 · Viewed 50.3k times · Source

I'm considering MongoDB for my next big project, but I have a couple of concerns. In particular, how can I do reporting?

My understanding is that I can't do the same kinds of joins and aggregation I would normally do in a relational database. The reporting I had in mind involves aggregating a lot of data from different "tables" with strict criteria.

Is this easily doable in MongoDB, or is it going to be a big headache?

Answer

John A. De Goes picture John A. De Goes · Apr 15, 2015

While Pentaho and Jaspersoft and other legacy reporting solutions have ways to pump data out of MongoDB, there are two newer solutions designed explicitly for analytics and reporting on MongoDB data:

  • JSON Studio. This is a commercial solution that lets you visually build aggregation pipelines and connect them to charts.
  • SlamData. This is an open source solution that lets you run SQL queries directly on MongoDB (including JOINs, GROUP BY, HAVING, etc), through the GUI interface or an API. The current version of the project has data visualization baked in, and allows you to create and embed reporting dash boards into MongoDB applications.

Because both of these run on top of MongoDB (versus the other approach, i.e. pumping the data out and normalizing it for reporting in Mondrian or something), they are much easier and more natural for MongoDB reporting. The flip side is that because the data is not loaded into all-memory cubes (for example), the reporting experience can suffer if you try to do complicated report generation in real-time.

Disclaimer: I'm a contributor for the SlamData project, although I have no affiliation with JSON Studio.