Tuesday, May 19, 2009

Pentaho Analysis Tool Integrated as a Pentaho Plugin

I had the chance this week to play around with the still-under-construction Pentaho plugin architecture in the Citrus code line. The new architecture is just what BI developers have been waiting for: totally flexible with several new ways to integrate with the server, simple to use and allows for building nicely decoupled extensions.

With Aaron Phillip's help, I got my head around the new features in less than a day, and had my first plugin written shortly after: The Pentaho Analysis Tool (PAT) plugin. Before I get into the details of the PAT plugin, let's first talk about the new tools and capabilities in the Pentaho BI server's plugin layer.

The plugin architecture consists of several different fun ways you can hook into the Pentaho BI Server, without having to modify server code or disturb the platform deployment. All avenues for leveraging the plugin architecture expect that the necessary files and code will be found in the solutions folders. The layer currently has the following capabilities:

  1. Customization of the menu system of the "classic" and more recent PUC (Pentaho User Console) user interfaces
  2. Customization of various page contents (overlays)
  3. New types of content to be added to the solution repository and operated upon in the user console
  4. New Java classes that generate UI pages to be dynamically added to the server
  5. (new in 3.0) Add your own BI Component to the platform without having to modify system files and paths
You can get more details about these features and how they work by reading the documentation here. Aaron also created a sample plugin that demonstrates each of these features in a simple plugin mockup, that also is a great template to use for new plugin creation.

So that's exactly what I did. Here's a screenshot of the results of my plugin:



Using the EchoPlugin sample as a guide, I created a new content type (.xpav, for Pentaho Analysis View) which is the first notion of a view definition file for PAT. When you "open" this new content type in PUC, it initializes and launches PAT, which is a separately deployed web application. This is accomplished by creating a new content generator in the plugin that delegates the generation to the PAT webapp. It takes a bit to put it all together: you need a bleeding edge Citrus BI Server download, the latest PAT code and the plugin project. If you are interested in seeing it in action, read the integration instructions here.

I only took advantage of a couple of the new plugin layer's capabilities in my first plugin. I'm looking forward to playing with the new web services as well as the component that allows my plain old Javabean to look like a BI component automagically. I can foresee great extensions coming fast for the Pentaho BI Server with this new architecture!

I've listed some good references for those who are ready to take a look at plugins:

Here is the documentation:
http://wiki.pentaho.com/display/ServerDoc2x/BI+Platform+Plugins+in+V2

and here is the Plugin Depot, where you can show others the cool new extensions you've built:
http://wiki.pentaho.com/display/ServerDoc2x/Plugin+Depot

and if you have questions, comments or problems, or think you may have spotted a bug, chat with some of the developers about it here:
http://forums.pentaho.org/forumdisplay.php?f=73

kindest regards,
Gretchen

2 comments :

venkata sai said...

Hi Gretchen nice to see your post on PAT.Its really helpful.

Cud u pls detail me in setting up PAT with PUC what u did.

Thanks and awaiting for your reply

Gretchen said...

Hi Venkata,

You can find download and install instructions on PAT's Google COde site here -
http://code.google.com/p/pentahoanalysistool/wiki/ServerIntegrationPluginForPAT

I haven't had time to keep up with the PAT project in the last few weeks, and I know they have released .3 since I wrote the plugin. It might take some small tweaks to get everything running. Let me know how it goes!

G