This post is part of the Pentaho Sparkl application builder tutorial. As my habitude the tutorial is described as a “step by step” list of tasks and commands, in my opinion more useful and clear to understand how to do and make it work.
The tutorial is developed using a Linux Ubuntu 12.04 LTS operating system, but even on a different platform the description should be valid and help to understand how to reach the goal.
This tutorial assumes that Pentaho Business Analytics Platform 5 is correctly installed into your system together with Sparkl. A basic Pentaho application should be created with it. If this is not your environment, please follow this tutorial.
A Pentaho application created with Sparkl is a set of dashboards developed with CDE of the Ctools, and Pentaho Data Integration – or Kettle – endpoints developed as PDI jobs or transformations with some specific characteristics. Of course those two subsets of the application will be able to interact to develop exactly what you expect. In this tutorial we are going to see how to create your first dashboard with some initial customizations.
Create a dashboard
First of all, access to Pentaho User Console as administrator (otherwise you won’t be able to access to Sparkl desktop) and access to Sparkl desktop.
ATTENTION: Do not access from here to the MyFisrtApplication because this link is to the content of the application and not the administration panel.
Once the Sparkl desktop will be visible, identify your application (in our case ‘MyFirstApplication’) and access to edit it by clicking on the ‘edit’ icon. Now that you are in the administration panel of the application, click on the ‘Elements’ tab to manage the dashboards and Kettle endopints.
- Name used to set a name for the dashboard. In our case we set to ‘myfirstdashboard’.
- Type used to declare what you are creating (if a dashboard or a Kettle endpoint). In our case we set to ‘Dashoboard’.
- Template to declare to use an empty and clean dashboard or a Sparkl template used as a predefined dashboard with some typical useful components like menu, ecc. In our case we set to ‘Clean dashboard’.
- ‘Admin only‘ flag used to set if the dashboard will be accessed to administrators only or not. In our case we set to ‘false’ to leave the access as public.
Click on the plus icon (that submit the request) to create the dashboard. Restart the Pentaho Business Analytics Platform using the ‘stop-pentaho’ and ‘start-pentaho’ scripts in that order (you can find them in the ‘biserver-ce’ folder). Access again to the Pentaho User Console as administrator and access to the application editing, in particular to the tab ‘Elements’ that should appear like the image below.
With the icons on the right of the dashboard you can:
- Preview the dashboard (the eye icon).
- Edit the dashboard (the pencil icon).
- Delete the dashboard (the trashcan icon).
Some technical details of the created dashboard
From a technical point of view, the dashboards created with Sparkl are typical CDE components of the CTools you can easily edit, customize in the layout, develop. The scope of this tutorial is not to show how to develop dashboards using CDE but this is a very important milestone of this impressive tool: integrate what exists and do not re-invent the wheel.
The dashboards created with Sparkl are physically stored into the file system as a collection of configuration files. We saw in a past tutorial that the whole application is stored in the folder described below (I would like to remember that ‘myFirstApplication’ is the name of the application).
All the dashboards of the application are stored in the folder described below (I would like to remember that ‘myfirstdashboard’ is the name of the created dashboard).
There you can find few files for each dashboard:
- myfirstdashboard.wcdf containing an XML describing some headers or settings for the whole dashboard.
- myfirstdashboard.cdfde containing an XML describing the structure of the dashboard in terms of layout, components, source code, data sources.
- myfirstdashboard.cda containing an XML with a kind of cache of the data used specifically by the dashboard.
Editing those files and restarting the Pentaho Business Analytics Platform, is the same task that modifying the dashboard from the user interface. 😉
Another very powerful feature is the capability to access to the dashboard as an URL, directly in your brand new application. The URL you can use from inside Pentaho or outside in your custom application is described below (I would like to remember that ‘MyFirstApplication’ is the name of the application and ‘myfirstdashboard’ is the name of the created dashboard).
ATTENTION: If you try to call the URL now that the dashboard is empty, of course the resulting page will be empty. Once that you customize the dashboard, the URL will start to show the filled dashboard.
TIP: From this point in ahead, the menu item in the Pentaho User Console will retrieve this dashboard as first initial dashboard.
In this tutorial we have seen how to create a first dashboard on a Sparkl application and some technical details about it. To get more tutorials on that topic, you can see the menu list in this page.