Saving and publishing a Mondrian schema

In this recipe, we guide you through saving the Mondrian schema created in the previous recipes in the filesystem and publishing it on the Pentaho BI server.

In previous recipes, we just created the Mondrian OLAP schema using Schema Workbench, a desktop tool. Since the Pentaho BI server doesn't know anything about the created schema, it is necessary to publish it. This means that you will be able to perform particular BI operations after publishing it on the BI server, such as self-service analysis using Pentaho Analyzer and/or Pentaho Dashboards.

After publishing the Mondrian schema on the Pentaho BI server, you can use some plugins available in the Pentaho marketplace, such as Ivy Schema Editor (IvySE), Community Text Editor (CTE), Pentaho Analysis Editor (PHASE), and so on.

Getting ready

Again, before you start this recipe, you need to make sure you have these things: the MongoDB databases created in previous chapters, the Data Integration and BI servers running, and the schema that you created in the previous recipe.

How to do it…

Proceed with the following steps:

  1. Let's save the schema in the filesystem. In the main menu, click on File and then on Save. Choose the location that you wish and set the filename to KetteThin.mondrian.xml.
  2. Let's publish the schema on the Pentaho BI server:
    1. First, you need to make sure that you have the Pentaho BI server started. For example, you can run the ./ctlscript.sh start main path command in your Pentaho installation for Linux systems. For Windows, click on the Start menu and select Start Pentaho BI Server. Another way in Windows is as follows: you start the Pentaho server services by going to Control Panel | Administrative Tools | Services and then start, stop, or restart the Pentaho service.
    2. After some minutes, you will be able to access the Pentaho BI server using the URL http://localhost:8080/pentaho for default installations.
    3. Enter your username and password; for example, the username can be admin and the password can be password.
    4. After you have logged on, click on the Manage Data Sources button, as you can see in this screenshot:
      How to do it…
    5. In the new Manage Data Sources dialog, click on the arrow and then select the New Connection... option, as you can see here:
      How to do it…
    6. In the new Database Connection dialog, set Pentaho MongoDB Cookbook Kettle Thin for the Connection Name field. After this, set Database Type to Generic database.
    7. In the Custom Connection URL field, set jdbc:pdi://localhost:9080/kettle?webappname=pentaho-di. Then in the Custom Driver Class Name field, set org.pentaho.di.core.jdbc.ThinDriver.
    8. In the User Name field, set admin, and in the Password field, set password, depending on the configuration in the installation of Pentaho. The configuration should be similar to what is shown in the following screenshot. Then, click on the OK button.
      How to do it…
    9. In the main menu of the Schema Workbench, select File and then select Publish....
    10. In the new Publish Schema dialog, set http://localhost:8080/pentaho/ in the Server URL field. In the User field, set admin, and set password in the Password field, depending on the Pentaho installation. For the Pentaho or JNDI Data Source field, set Pentaho MongoDB Cookbook Kettle Thin. Then click on the Publish button. The configuration should be similar to this:
      How to do it…
    11. After a couple of seconds, we should get a message box with a Publish Successful message.

How it works…

In this recipe, we started by creating the database connection using the Kettle Thin JDBC driver in the Pentaho BI server. The connection is the same as that for the Schema Workbench, as the schema can simply work in the same connection. Otherwise, you face the risk of data being unavailable for exploration. This is because the schema is defined for a specific physical database structure.

Having defined the connection, we use the Schema Workbench to publish the Mondrian schema. Basically, we choose the server URL and the credentials for publishing (these were defined on the installation), and we define the connection name that will be used by the schema in the Pentaho BI server. Also, it is possible to make the schema available for XMLA (XML for Analysis).

XMLA is a standard for data access in analytical systems such as OLAP and data mining, based on standards such as XML, SOAP, and HTTP.

There's more…

It's possible to publish the Mondrian schema without the Schema Workbench. Basically, you need perform the following steps:

  1. Log in to the Pentaho BI server.
  2. Click on Manage Data Sources.
  3. In the Manage Data Sources dialog, click on the arrow and then on Import Analysis....
  4. In the Import Analysis dialog, you have to select the Mondrian schema in your filesystem. You also have to select the connection for the correct data source, as shown in the following screenshot:
    There's more…

See also

There are some interesting community plugins for handling the Mondrian schema, such as Ivy Schema Editor (IvySE) or Pentaho Analysis Editor (PHASE). You can check them out in the Pentaho marketplace.

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

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