In this recipe, we are going to add a Table component to a dashboard so that we can render a data source result for the user.
Getting ready
To get ready for this recipe, you first need to start the MongoDB server with the same database as that of the last chapter. You will also need to start the Pentaho BA Server using the server control scripts. Once it is started, you should be able to log in to the BI Server.
How to do it…
Proceed with the following steps:
In the PUC, go to File | New | CDE Dashboard.
Save your dashboard in Public | Pentaho MongoDB Cookbook | Dashboards with the name Table Component.
Click on Settings in the CDE Main Menu.
Click on the Layout tab.
Then click on the Add Row button.
Select Row.
Set the Name property to ROW1.
Then set the Height property to 300, as shown here:
Click on the Data Sources tab.
Expand the KETTLE Queries data source category.
Click on the kettle over kettleTransFromFile data source.
Set the Name property to QUERY1.
Click on the Browse button on the Kettle Transformation File property.
Navigate to Public | Pentaho MongoDB Cookbook | Transformations.
Select Chapter7-getorders.ktr.
Click on OK.
Set the Kettle Step name property to OUT, like this:
Click on the Component tab.
Expand the Others category.
Add a TableComponent.
Set the Name property to TABLE1.
Then set the Datasource property to QUERY1.
Next, set the HTMLObject property to ROW1, as follows:
Click on Save.
We can now preview our dashboard as follows:
Click on the Opened menu on the Pentaho User Console and select Browse Files.
Click on Opened on the right-hand side menu and the following screenshot should appear:
How it works…
In this recipe, we created a simple but functional dashboard. After we had created an empty dashboard, we created a data source based on a Pentaho Transformation. Finally, we added a Table component to the dashboard, hooked it up with the QUERY1 data source, and placed it on a layout row called ROW1.
These are the basics you need for 99% of your dashboards. You need a layout, data sources, and components that execute the data sources and render the results on the dashboard layout.