Creating an analysis view

This recipe guides you through the process of parsing and profiling from a MongoDB collection and creating an instant analysis report.

Getting ready

To get ready for this recipe, you first need to start Spoon and the MongoDB server with the same database as that of the previous chapter.

How to do it…

Perform the following steps to create a simple analysis view:

  1. In Spoon, change the perspective to Instaview. If you are using Windows operation the Windows operating system, you can start Instaview from the Start menu by selecting Pentaho Enterprise Edition | Design Tools | Instaview.
  2. Click on the Create New button.
  3. In the New Data Source dialog, select the Big Data tab. Next, select MongoDB and click on OK.
  4. Define the MongoDB connection by performing the following steps:
    1. In the MongoDB input, select Configure Connection tab.
    2. Set the host name(s) or IP address(es) to localhost.
    3. Set Port to the default port number, which is 27017.
    4. Select the Input options tab.
    5. Click on the Get DBs button and select the SteelWheels option for the Database field. Click on Get collections and select the Orders option for the Collection field.
    6. Select the Fields tab.
    7. Uncheck the Output single JSON field option;
    8. Click on the Get fields button. After analyzing the sample documents, remove the _id field from the list. You should get the list as shown in the following screenshot:
      How to do it…
    9. Click on OK.
  5. After the data of the connection has been processed, you should see the interactive analytics screen as shown in the following screenshot:
    How to do it…
  6. Drag and drop the Totalprice measure into the Measures area. You'll get the global number of the total price.
  7. Drag and drop the Orderdate level into the Rows area. Instantly, you'll get the total price by order date.
  8. Click on the Save view button.
  9. Next, click on the Close button, and in the Save Datasource dialog, set MongoDB Orders to the data source name and click on the Save button.

How it works…

Pentaho Instaview is based on three main simple steps: choose the data source, auto-prepare the data for analysis, and Pentaho interactive visualize and explore. This recipe demonstrates all of them. However, as in any self-service or automated solution, sometimes it is necessary to customize and optimize the solution. The next recipe is about the modifications that you can make in Pentaho Instaview.

After the first step, choosing the data source (MongoDB, in this case), we define the connection to our collection for the second step. As you probably noticed, the interface for defining the connection looks similar to Spoon. This is because Pentaho Instaview creates a transformation to be executed in order to make the data available for exploring and visualizing. In the next recipe, we will demonstrate how you can edit this transformation.

The end result is an interactive visualization report that allows you to explore your data quickly. However, the metadata model that was generated automatically is a little inaccurate. Nevertheless, it's possible to change it, as is explained in one of the later recipes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset