O'Reilly logo

Pentaho Analytics for MongoDB Cookbook by Harris Ward, Joel Latino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a report with MongoDB via Java

There are times when we might need more control over our MongoDB data source. In cases like these, it's possible to execute a MongoDB query using BeanShell. This allows us to call up the MongoDB JDBC classes to execute the query manually.

Getting ready

To get ready for this recipe, you will have to make sure your MongoDB instance is running.

How to do it…

We are going to add a new advanced data source:

  1. In Report Designer, navigate to File | New.
  2. Click on the Data tab in the top-right corner of Report Designer.
  3. Right-click on the Datasets item in the list, select Advanced, and then Scriptable.
  4. Select the beanshell language from the panel on the left-hand side.
  5. Add a new value using the green plus icon.
  6. Set the Name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required