Pentaho CDE Samples

This is a collection of Dashboard examples already shared by bloggers that are recreated and tested on Pentaho Server CE 8.1 community edition.</p>

Most of these tutorials, presented in alphabetical order, are still online but some required minor changes to work in the current suite.

You can upload the code to see it in action or use it as reference. At the bottom you’ll find the link and instructions to upload them to your system.

Annual Sales

An interesting Dashboard is “Annual Sales” from Tercer Planeta (post) that shows the table component with columns like the databar or sparkline. It’s also interesting that it uses functions to change extension points, protovis colors or CSS in CCC charts.

The database is AdventureWorks (see previous post to upload it in SQL statements for MySql).

recreación Sales 2003-2005

Bullet Graph Dashboard

The original post of 2012 provided a step by step guide to build this Dashboard that uses a MDX query (Mondrian model from a star schema) and a tabular component to show the monthly data, it also gets that information in Kettle/PDI (ETL) and adds metrics data (like a scorecard/KPI) and shows them on a Bullet Chart. Its a simplified example (processes, bullet graph metrics and aggregations on mondrian) of a real Dashboard that I did for a client. There are also samples in pre-excecution and format functions to modify values in parameters or CSS to change the Chart style.

The chart data is refreshed by updating the queries when the year or month selectors change.

recreación Bullet Graph

For this to work on your system check last section.

Data Dashboard Steels-Wheels

This is a Dashboard that ATOL Conseils & Développements shared a while back. I couldn’t find the tutorial link but they have more complex and beautifull Dashboards in their site or articles like this one that talks about data access in a mondrian cube.

In this example you can see the use of pie and line charts and also the table component. At that time the arrows had to be drawn in javascript (use an if to show a gif file), now its a type of column. There is also code for the tooltip data.

recreación Atol

Sales Overview YTD Dashboard

This one was one of the first Dashboards that I saw. In 2011 Slawomir Chodnicki showed in his blog the complete procedure to build a Dashboard from a draft up to detail javascript that modified a graph (at that time no bullet graph component existed) to show what he wanted. I updated the components but the post is a jewel.

recreación YTD

Steel Wheels Demo Dashboard

This was a Dashboard included in CE. It shows bar graphs updated by a selector.

Demo Steel-Wheels.jpg

Welcome Dashboard in CTools

I guess this is a previus version of the current Dashboard example. The current one even lets you select views so this one could be used as a startup point to lear this tools.

Demo Welcome Dashboard

New Dashboard (RequireJS)

CDE used by default the 24 column blueprint design framework, now its the 12 column, but it also supports Bootstrap, it even has a button to generate a skeleton layout in the Layout view. When you craete a new CDE Dashboard it enables the RequireJS javascript library, you can change to node.js in the settings toolbar. That is important as some events are referended diferently in the former is this.dashboards and in the later is Dashboards with some events and methods available in each one.

This sample is documented at theat Hitachi-Vantara site and is built using the bootstrap framework in layout and RequireJS code. It is built differently that the old ones and further in the tutorial it says it can be embeded in pages outside the server.

Demo Sample with RequireJS

More samples

There are three more examples, two are components to use in more complex Dashboards, one has bars and the other dots.

And the thirth is a report from Will Gorman. This one needs tables from google analytics to work, but its a beautifull sample built with Pentaho Report Designer (PRD).

Will Gorman report.jpg

The Dashboard’s Code

To get this files into your system you have to:

  1. Get this zip file.
    You can confirm that it contains a manifest in xml and a folder with the different CTools files.
  2. Then login into yor Pentaho-server , select the home button and select Browse Files → click on Public folder.
  3. In the right menu the upload option will appear. Click on it. Click on the Browse button and navigate to the downloaded file and click Open and Ok.

After a few momments you can navigate in the Additional Examples folder. To see all the files you have to click on the top menu view and click on Show Hidden Files.

menu

Most of them work with the SampleData Datasource so they should work on your system as it is.

[Edit]

If you want to see Geo Localization examples then check Kleyson de Sousa Rios Github page and download and upload the zip file with his examples for the NewMapComponent (NMC-samples).


* Mondrian schema location (Bullet Graph Dashboard)

I could’t find a way to reference the mondrian schemas on the system JCR repository taht is needed in the Mondrian Input Step, so I edited the Datasource Kettle Component → dsBulletGraph by clicking in (…)

EditInputMondrianCatalog

And used ${Internal.Transformation.Filename.Directory} and move two levels up “/../..” to refer to your tomcat/pentaho solutions.

EditInputMondrianCatalog1

If you develop your PDI transformation, the Catalog location field must contain the complete path-filename to your mondrian XML specification, then afer you upload it in your Pentaho Server, make the edit to your schema path.

So, for this example to work, you have to download a copy of steelwheels.mondrian.xml that’s in your Pentaho Demo system repository to the /tomcat/pentaho-solutions directory, or download this copy in a Zip file.

Notes on 5.x Migration

BI projects in Mexico have been slow for me so I haven’t posted much information lately. But the release of 5.1 CE in par with the EE version deserves a mention and a post.

Moreover since webdetails has made Dashboards development something doable interactively, coherent and documented but at the same time a nightmare for each time you upgarade their ctools plugins an improvement on them messes up your dashboard’s looks.

Well, I have just upgrated with the CE release from 5.01 to 5.1 and kudos for making that an easy job. Thanks for thinking on us that can only use Open Source products.


Notes on the 5.x version

For years from 2.5 up to 4.8 version the BI Server, the link between the individual Pentaho projects was guided by a Pentaho team, but somehow decided to unload the web project to a new partner for for the 5.01 release.

So some changes on its infrastructure were expected, this is what I have notice so far:

  • The repository (a fancy way to describe the pentaho-solutions folder on the CE standar edition) was migrated to a encrypted structure on the pentaho-solutions/system that you can set on folder or in a database.
    So now you have to ‘upload’ some of your files to this structure like reports, resources (images, css) so they can be found by the BI web server. Some others like the .ktr transformations can still live on normal files, it depends on how you code the paths on your programs. I like this as version control can be maintained on them.
    The users, new roles and datasources have also been moved from a database to the Apache Jackrabbit Content Repository (JCR).
    All the administration can be done from the BI web server.
  • The important configuration files retain their functionallity and location, but others are being taken to pieces or relocated so they can be consolidated on new ones.
    They are being commented so the inconvenience is minimal.
  • The console or web interface has a new paradigm, so you and your users will need a video or a presentation to get full use of it. Navigation between browsing programs, results, administration or home page is controlled by a selector on your upper left insted of the older tabbed interface.
  • Most of your development will need to be done or maintened.
    The sequencing actions (.xactions) files are deprecated and can be migrated once you know to:
    – Edit them without special characters (use unicode) speccially in the name.
    – Save them in UTF-8 or cant be uploaded.
    – Change <viewer>Pivot</viewer> to <viewer>plugin/jpivot/Pivot</viewer>
    – Change <model><![CDATA[solution:your-path/your-model.mondrian.xml]]></model>
    to <model><![CDATA[mondrian:/your-model]]></model>.
    Note: You have to upload the model to the repository. You browse to your folder on the web UI and click on upload.
    – The Design Studio is no longer maintained and a text editor can be used
  • The Report Designer has new attributes and quirks but its ok. Now you can ‘publish’ yor reports to your server.
    I used to specify which formats could the user select for output on a parameter, now is a default and you can select a default on the PRD.
  • The Metadata editor can read the models and publish them to the BI server too.
  • Once you save a .ktr file you won’t be allowed to read it in the olver PDI version.
  • What I miss is the Saiku Reporter as it has not been migrated yet.
    Those programs and the ones on Ad-hoc queries (now on WAQR plugin on the marketplace) had to be built from scratch so documentation of your site is very important on this migration.
  • The changes on CDE are many, really, many things have changed: The protovis library it uses has been deprecated, the version changed from 1.0 to 2.0 as a result interface fields have changed and a few don’t work as advertised. Check next section so you’ll be warned.

Dashboard Changes

Graphical representation is a key in information visualization, to make graph libraries present the way you desire you need documentation.

The webdetails site has good documentation on the CDE to get started but some later changes are not explained for ‘advanced topics’. you’ll need to browse the protovis site or look for tips like this one on vesion changes Main_Changes_New_Features_CCC_v2.

Some changes are minimal, as an example, you used to set an extension point as a pair: pie_innerRadius,50. Now you use: slice_innerRadiusEx,50%. You can see that you will need lots of time to make your dashboard behave like it used to.

Other point of difficulty are functions and how you pass a parameter, You used to format a tooltip:

function f(value){return ('$'+sprintf("%.1f", value)+'m')}

now you pass an object and has to specify the full path:

function f(scene){
    return ('Puesto '+scene.vars.category.value+' , con '+scene.vars.value.value+' personas');
}

The problem is that the object has a few variations and can be navigated on some others.

Tip: The code to trigger a change on a click change from:

function d(a,b,c){ updateParamFunc("PARAM_MARKET", b) }

to

function d(scene){ updateParamFunc("PARAM_MARKET", scene.vars.category.value) }

Heres an article on the pentaho forum that talks about extension points.

I noticed also than table rendering has changed from 5.01 to 5.1, now its better as has several divs to control format but you will have to use your firebug plugin to tame them with .css files (that has to be uploaded to the repository).