Writing Components for Pentaho Dashboard Designer 3.8.0

Beginning in Pentaho BI Suite 3.8.0, it is now possible to extend Pentaho’s Enterprise Dashboard Designer by adding custom embedded widgets to the UI.  For a while now, it has been possible to include content from the repository as dashboard widgets.  If you are writing a Pentaho BI Server plugin, modify the settings.xml to include the following xml:

    <dashboard-widgets>
      <mytype>scripts/widget/MyWidget.js</mytype>
    </dashboard-widgets>

This js file should contain your CDF Component implementation, a static method on the component called newInstance() for initial construction of the dashboard widget, along with a call to the dashboard designer to register the component:


 PentahoDashboardController.registerComponentForFileType("mytype", MyComponent);

See Analyzer’s plugin.xml and AnalyzerDashboardWidget.js for an example of the implementation.

Starting with the 3.8.0 release, it is easy to add your own embedded content into Dashboard Designer as well.   The three available embedded widget types, Chart, Data Table, and URL, have been converted over to plugins, so it’s easy to see how this can be done.

First, in a similar manner to repository content, you need to implement a CDF Component.  In addition to the basic component implementation, you also need to provide the following javascript attributes and methods to your component:

Attributes

iconImgSrc - The location of the icon image to appear in the new widget drop down list and editor panel.

localizedName - The name of the widget that will appear in the new widget drop down list and editor panel.

Methods

createWidget()  - This method is called when a user selects the widget from the new widget drop down list as seen in the image above.  This method should present the user with a UI for creating a new widget, and then create the widget, wiring it up to the dashboard after creation.

editWidget() - This method is called when a user clicks the edit icon within the widget panel.  This method does practically the same thing as the createWidget(), but also has access to the currentWidget javascript object that contains a pointer to the widget being edited.

Once you’ve defined the component you also need to register the widget type with the dashboard.  Make this call at the end of your javascript file:

PentahoDashboardController.registerWidgetType(new MyEmbeddedComponent());

Finally, register this javascript file the same way as we did above within your settings.xml file.

With just a few lines of javascript, you can create your own component for Pentaho Dashboard Designer!

Translating Pentaho

As part of our fun week this year, I began work on a tool to make it easier to contribute translations of all Pentaho projects (There are over 100!) .  Since then, I’ve been working in my spare time to get to an initial release of the project.  I now have a first cut available, and I’m looking for feedback on the tool.  I haven’t yet invested much in the UI, but now that all the plumbing is working well, we can start discussing what capabilities would be the most beneficial to folks who might want to contribute a translation.  You can download the latest here on our continuious integration server:

http://ci.pentaho.com/job/pentaho-i18n-tool/

Please check it out and let me know what you think!

Pentaho Metadata Dialect SPI

Pentaho Metadata allows business users to build reports and dashboards without the need to learn SQL.  Pentaho’s Metadata system takes business user queries and translates them into SQL based on a model described by an administrator.  Today, Pentaho Metadata supports the most popular backend SQL database dialects, generating the correct SQL for Oracle, MySQL, Microsoft SQL Server, and more.

Before, if you wanted to contribute a new SQL dialect for another database for use with Pentaho Metadata, you’d have to submit a patch to the project.  Now, all you need to do is follow the simple instructions here, which utilize Java’s Service Loader API, and plug in your own dialect.  This is a great enhancement!

Lego Skill Crane: The Claw

Over the weekend I completed my latest project, a Lego skill crane, including a video and instructions on how to build it yourself. The idea spawned from my 4 year old’s interest in Toy Story. The project has been featured on many blogs, including Ubergizmo, Make: Blog, Hack A Day, Neatorama, The NXT STEP, and Fascinating Lego Model of the Day.

Using the ICacheManager in Pentaho’s BI Server

Caching objects is a core capability of any server architecture. Within Pentaho’s BI Server, we have a simple API for defining caches that any plugin or component can use easily.  In a Java environment, the simplest cache is a java.util.Map.  This is used often and unfortunately it has some major drawbacks, the primary one being that you can run out of memory if you’re not careful.  Why invent your own caching solution when there is one that can easily be used?

Pentaho defines a simple org.pentaho.platform.api.engine.ICacheManager interface, and the default implementation, org.pentaho.platform.plugin.services.cache.CacheManager, uses Hibernate’s Cache.  Here is a simple code example that demonstrates using Pentaho’s ICacheManager:

// get a reference to ICacheManager
ICacheManager cacheMgr = PentahoSystem.getCacheManager(pentahoSession);

// create a cache region if necessary
if(!cacheMgr.cacheEnabled("my_plugin_cache")) {
cacheMgr.addCacheRegion("my_plugin_cache");
}

// store an object into the cache
cacheMgr.putInRegionCache("my_plugin_cache", "url_1", "http://www.pentaho.com");

// now retrieve the item from the cache
String url = (String)cacheMgr.getFromRegionCache("my_plugin_cache", "url_1");

// now clear the cache
cacheMgr.clearRegionCache("my_plugin_cache");

That’s it!  To learn more about how to use the ICacheManager, check out our BI Server documentation at http://wiki.pentaho.com/display/ServerDoc2x/Using+PentahoSystem+ICacheManager.

Agile BI Update

Since we announced Agile BI back in 2009, we’ve been busy developing the initial set of features that demonstrate how a BI developer can quickly build models and analyze data within our ETL product, Pentaho Data Integration.  This past week, Jake Cornelius, our Director of Product Management, demonstrated Agile BI at the TDWI Bake-Off.  The audience was impressed, voting for Pentaho in the “Cool Stuff” category.  The team is now executing on its final feature sprint, and we’re aiming to release RC1 of the product around the end of March.  Check out the most recent milestones over on Agile BI’s community website!

Agile BI Milestone 1 is now available

We’ve been working hard at Pentaho to deliver the first milestone of Agile BI.  A little over a month ago, James Dixon, our CTO, presented to the community the initial concept, which includes integrating dimensional modeling and visualization within Spoon, our ETL environment.  Since that time, James and the engineering team at Pentaho have been sprinting towards this release, making the source code available in the open, along with adding additional capabilities including the ability to persist models and visualizations.

You can download the first milestone and begin experimenting with the beginnings of what we are considering phase 1 of the Agile BI initiative, which includes the ability to quickly model and visualize a single fact table metadata and olap model.  Feedback is always welcome, check out the Agile BI forum for more discussion.

JavaRanch Book Promotion

Want to try and win a free copy of Pentaho Reporting 3.5 for Java Developers?  Go visit JavaRanch.com and ask a question about the book in the Other Open Source Projects forum between now and the 16th of October, and you’ll be eligible to win one of the four books being given away.  I want to thank JavaRanch for promoting the book, they have over 100,000 Java Developers on their mailing list and a very active forum community.

More than just Analyzer

There has been a lot of buzz recently about Pentaho’s acquisition of LucidEra’s ClearView technology, now known as Pentaho Analyzer Enterprise Edition, including this detailed writeup by Julian Hyde. But one
important aspect of this acquisition that has gone unmentioned, which I am most excited about, is the addition of Benny Chow to the Pentaho engineering team.

At LucidEra, Benny was the Director of Engineering and was responsible for the development of ClearView. In his short time here at Pentaho, he’s already had a great impact on our engineering efforts especially with the integration work necessary to make Analyzer an integral part of Pentaho’s User Console. Let me be the first to publicly welcome Benny to the Pentaho team!

A Busy Week with Matt

This week, Matt Casters spent the week here in Orlando, working with engineering and product management on our next big project.  I’m very excited about the work he’s been doing with Kettle 4.0.  Also this week, the engineering team is working towards delivering BI Platform 3.5 RC2.  I’ve found myself working in a lot of different projects, primarily Mondrian and Pentaho Metadata.

Also this week, we released 3.5 RC1 of Pentaho Reporting and BI Platform.  If you haven’t already, I recommend downloading Pentaho Report Designer and BI Server 3.5 RC1 and giving it a whirl.  It includes a lot of goodness, including Mondrian 3.1.1, Kettle 3.2.1, and of course Pentaho Reporting 3.5 RC1, which includes major enhancements including side-by-side sub-reports.  Your feedback will help us release a very solid stable version.  Thanks!

« Previous PageNext Page »