Create a dashboard that uses a streaming service as a data source
With the Community Dashboard Editor (CDE), you can create a dashboard that uses a streaming service as its data source. First, define the streaming data service in Pentaho Data Integration, then create a dashboard in CDE that uses the streaming service as its data source.
Open Pentaho Data Integration and connect to the Pentaho Repository.
Create a streaming transformation and Save it to the Repository.
In the transformation's streaming step, right click, select Data Services, then New.
Create a data service with a unique Service Name (for example: streaming_dataservice) and set the Data Service Type to Streaming.NoteEach streaming data service in the Pentaho Repository must have a unique name. For more instructions, see Creating a regular or streaming Pentaho Data Service.
Save the transformation again.
Create a streaming dashboard
In Pentaho User Console, create a new CDE dashboard. For instructions, see Create and save a new dashboard.
From the Data Sources perspective, add the data source type streaming over dataservices (found in the DATASERVICES Queries list).
Set the parameters as follows:
Parameter Value Name Specify the name you want to assign to this data source. For example: mydatasource Streaming Data Service Name Specify the same Data Services name you created in the Prerequisites section above. For example: streaming_dataservice Query
In SELECT * FROM dataservicename replace dataservicename with the identical data service name you entered in the Streaming Data Service Name parameter above. For example:
SELECT * FROM "streaming_dataservice"
Window Mode Select Row Based to indicate the window mode to use when this data source is used, which can be either row-based or time-based. Window Size Specify 50 to indicate the number of rows that a window will have (row-based), or the time frame (time-based) for which you want to capture new rows in the window. Window Every Specify 1 to indicate the rate at which each streaming data window is generated, either the number of rows (row-based) or the time in milliseconds (time-based). Window Limit Specify 0 to indicate the maximum number of rows (row-based) or milliseconds (time-based) which will be used to wait for a new window to be generated. Component Refresh Period Specify 2 to indicate the amount of time in seconds used by the component to refresh.
Create or apply an existing layout to the dashboard. For instructions, see Create the layout for the dashboard.
Add a table component to the layout and enter the following properties:
Parameter Value Datasource Specify the same data source name you created for the Name parameter above. For example: mydatasource Don't Block the UI While Executing Select True to indicate that the user interface is not blocked while loading and executing this component. Clears Before Pre Execution Select False to indicate that Clear is not executed before the component's execution phase.
Add a Community Charting Components (CCC) Line Chart component to the layout.For instructions, see Add a line chart. Give the Line Chart component the properties listed in the table below. Omit the optional parameters if you do not need the Tick requirement.
Parameter Value Datasource Specify the same data source name you created for the Name parameter above. For example: mydatasource Don't Block the UI While Executing Select True to indicate that the UI is not blocked while loading and executing this dashboard. Clears Before Pre Execution Select False to indicate that Clear is not executed before the component's execution phase. Animate Select False to indicate that the chart should not show an entry animation every time it is fully rendered. Render Mode (Optional) Select Partial - Same Metadata to indicate the type of render to use when updating the component. Sliding Window (Optional) Select True to indicate the existence of a sliding window. Base Axis Preserve Tick Alignment (Optional) Select True to re-use the horizontal axis ticks for continuity. New data adds to existing data (Optional) Select False to indicate that new data replaces the existing data in the visualization.
To view and test your streaming dashboard, click the Preview Your Dashboard icon located in the CDE Perspectives toolbar.The Preview window displays.