Skip to main content
Hitachi Vantara Lumada and Pentaho Documentation

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 PDI, then create a dashboard in CDE that uses the streaming service as its data source. 

Prerequisites

In PDI, define a streaming Pentaho Data Service by building a transformation that has a streaming step, such as MQTT Producer or Generate Rows. For best results with Generate Rows, activate the option to keep generating rows. Perform the following steps to define a streaming data service:

  1. Open PDI and connect to the Pentaho Repository.
  2. Create a streaming transformation and Save it to the Repository.
  3. In the transformation's streaming step, right click, select Data Services, then New.
  4. Create a data service with a unique Service Name (for example: "streaming_dataservice") and set the Data Service Type to Streaming.

Each streaming data service in the Pentaho Repository must have a unique name. For more instructions, see Create a Regular or Streaming Pentaho Data Service.

  1. Save the transformation again. The data service you defined is now available for use in CDE as a data source for a dashboard.

Create a Streaming Dashboard

To create a CDE dashboard with a data source from a PDI streaming Data Service, perform the following steps:

  1. In PUC, create a new CDE dashboard. For instructions, see Create and Save a New Dashboard.
  2. From the Data Sources Perspective, add the data source type streaming over dataservices (found in the DATASERVICES Queries list).
  3. 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. 
  1. Create or apply an existing layout to the dashboard. For instructions, see Create the Layout for the Dashboard.
  2. 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. 

     

  3. 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.

     

  4. To view and test your streaming dashboard, click the Preview Your Dashboard icon located in the CDE Perspectives toolbar. The Preview window displays.