A dashboard is in its broad sense is an application that shows you visual indicators, for example, bar charts, traffic lights, or dials. A CDF dashboard is a dashboard created with the Community Dashboard Framework. CDF accepts many kinds of data sources being the output of a Kettle transformation being one of them.
In this recipe, you will create a very simple dashboard that shows this capability. You will type the name of a city and the dashboard will display graphically the 5-days forecast for that city. The forecast information will be obtained with the sample transformation explained in the introduction.
In order to follow this recipe, you will need a minimal experience with the Pentaho BI Server. Some experience with the Community Dashboard Editor (CDE) is also desirable.
Before proceeding, make sure you have a Pentaho BI Server running. You will also need the CDE. You can download it from http://cde.webdetails.org. To install it, simply unzip the downloaded material and follow the instructions in the INSTALL.txt
file.
Finally, you will need the sample transformation weather_np.ktr
.
Carry out the following steps:
wcdf
will appear in the solution folder.Now, let's add the visual elements of the dashboard.
city_param
and type Lisbon, Portugal
for Property value. city_textbox
. For Parameter, select city_param
and for HtmlObject, select filter_panel
. city_name
parameter, showing the default value Lisbon, Portugal
. forecast_bars
350
250
forecast
5-days forecast
chart_panel
city_param
CITY
and for Val0, type city_param
, and then Click on Ok.Finally, you have to create the datasource for that chart: forecast
. The following steps will do it:
forecast
. weather_np.ktr
. CITY
and click on Ok. CITY
1, 2
, and 3
respectively and click on Ok. 2
for Arg0 and MIN
for Val0. In the second row, type 3
for Arg1 and MAX
for Val1. next_days
and click on Ok.In this recipe, you created a very simple dashboard. The dashboard allows you to enter the name of a city and then refreshes a bar chart displaying the 5-days forecast for that city. The special feature of this dashboard is that it gets data from a web service through the execution of a Kettle transformation.
In order to use the output of your Kettle transformation as data source, you just have to add a new datasource from KETTLE Queries | kettle over kettleTransFromFile and configure it properly. This configuration involves providing the following properties:
Property |
Meaning / Purpose |
Example |
---|---|---|
Name |
Unique datasource name inside the dashboard |
|
Kettle Transformation File |
Name of the transformation file |
|
Variables |
Name of variables that are passed to the transformation. You have to provide it in pairs (<CDE |
|
Access Level |
|
|
Parameters |
Name, default value, and type for each parameter to be passed to the transformation |
|
Output Options (opt) |
Indexes of the columns to pick among the fields coming out from the transformation |
|
Column Configurations (opt) |
Renaming the columns coming out from the transformation |
|
Column Configurations II (opt) |
Calculating new columns based on other columns |
|
Query |
Name of the step that delivers the data |
|
Cache |
Keep results in cache (True/False) |
|
Cache Duration |
Time to keep the results in cache in seconds |
|
Once you configured your Kettle transformation as a datasource, it was ready to be used in the components of your dashboard.
CDF is a community project whose objective is mainly to integrate dashboards in the Pentaho's solution repository structure. In the recipe, you used the CDE, which is a graphical editor that complements the power of the CDF engine. With CDE, you can create dashboards without having to get involved in the low-level details of the CDF files, thus focusing on the business requirements.
Kettle is just one of several kinds of data sources accepted by CDF. Behind the scenes, most of the data sources definitions are saved in a CDA file.
If you already have a CDA file that has a data access for your transformation, then you can avoid configuring the data source twice and use the Community Data Access | CDA Datasource instead.
CDF is bundled with the Pentaho BI Suite, but maintained by Webdetails with the help of the community. For more information about CDF, see the full documentation here: http://cdf.webdetails.org. For more on CDE visit http://cde.webdetails.org.