Scenario: Creating an Apache Hive Dashboard

You can use the HiveQL Connector that is already provided in Cloud Application Business Insights to connect to an Apache Hive Data Source. You can then create a manual data definition to retrieve data from the data source and display it on a dashboard.

Use case description

As a dashboard designer, I want to create a custom dashboard to view specific employee data from an Apache Hive Data Source.

Query used

The dashboard for this use case displays the following data from the web service:
  • name
  • salary
  • Ensure that the Apache Hive data warehouse that you want to connect is up and running, and is not Secure Sockets Layer (SSL) secured.
  • Copy the Apache Hive configuration file, hive-site.xml, to the system where Cloud Application Business Insights is installed.

    For example, /opt/hiveconf/hive-site.xml

    Where hiveconf is a folder that you created within the installation directory to copy the XML file.

  • Ensure that the DNS entry for the Apache Hive Server is configured. If the DNS entry is missing, then you must add the host name and IP address of the Apache Hive Server to the /etc/hosts file on the system where Cloud Application Business Insights is installed.
To create a dashboard, you need to complete the following tasks:
  1. Configure an Apache Hive Data Source.
  2. Create a manual data definition to query the data source.
  3. Create a dashboard that displays the data that is retrieved from the data source.

Configuring an Apache Hive Data Source

Complete the following steps to configure an Apache Hive Data Source named Hive_source:
  1. Access the Dashboard Designer tool.

    For more information, see Accessing the IBM Cloud Application Business Insights web interface.

  2. Configure an Apache Hive Data Source.

    For example, create a connector source, Hive_source.

    Use the following information to create the Hive Connector source:
    Fields Value
    Connector Type HiveQL
    Connector Source Name Hive_source
    Database Connection URL jdbc:hive2://Server_IP_or_HOSTNAME:port_number/db_name

    The default port for Hive is 10000.

    Hive Configuration Resources Enter the path to the hive-site.xml configuration file that you saved on the Cloud Application Business Insights server.

    For example, /opt/hiveconf/hive-site.xml

    Database User Enter a user name that is used during Apache Hive configuration.

    This field is optional and you can leave it blank if any user name was not used during Apache Hive Data Source configuration.

    Password Password to access the Apace Hive Data Source.

    This field is optional and you can leave it blank if any password was not used during Apache Hive Data Source configuration.

  3. Click Next.
  4. In the Query field, enter a sample query for Apache Hive.

    For example, SELECT name from ICABIemployee

  5. Click Save.
  6. To make sure that the connection to the data source is successful, click Test Connection.

    If the source details and the sample request are valid and complete, then a message indicating that the connection is successful is displayed.

    For more information, see Configuring Apache Hive Connector Sources.

Creating an Apache Hive Manual Data Definition

Complete the following steps to create a manual data definition named Hive_query for Hive_source:
  1. In the navigation pane of Dashboard Designer, click Data Definition > Custom > Create New Data Definition.

    The New Data Definition tab opens.

  2. Create a manual data definition, Hive_query for Hive_source:
    Use the following information to create Hive_query for Hive_source:
    Field Value
    Connector Type HiveQL
    Connector Source Name Hive_source
    Query select eid, name, salary from ICABIemployee
  3. To view and validate the response received from the manual data definition that you created, click the Preview Preview icon.

    The response from the manual data definitions is displayed in a tabular format. You need the column names to define chart properties when you create a dashboard.

  4. Save the manual data definition as Hive_query.

Creating a Hive Dashboard

Complete the following steps to create a Hive Dashboard named Hive:

  1. In the navigation pane of Dashboard Designer, click Dashboards, and then click Create New Dashboard.
  2. In the Create a New Dashboard: Select a layout window, click a 1x1 layout, and then click Select.

    For more information, see Layouts.

  3. In the navigation pane of Dashboard Designer, click Chart, and drag a Clustered Columns chart to the widget or chart area.

    For more information about the various chart types, see Charts.

  4. Click the Set Data Definition Set Data Definition icon icon.
  5. In the Set Data Definition window, click Select from saved Data Definition, and then click Continue.
  6. In the Set Data Definition window, click Hive_query that is listed under Data Definition (select one or more) pane, and click the Move to selected Move to selected icon to add the data definition to Selected Data Definition pane.
  7. Click the Set Properties Set Properties icon icon.
  8. In the Set Properties window, click Chart > SERIES.
  9. In the X-axis Labels, Y-axis Values, and Legends fields, enter a column name that is used in the saved data definition that must be displayed on the chart.

    For example, the following table displays the user interface fields and the values that are entered in each field:

    Table 1. User interface fields and values
    Field name Value
    X-axis Labels name
    Y-axis Values salary
    Note:
  10. To save the dashboard, click Save.
  11. Build a menu and add the dashboard to the menu by using the following tasks:
    1. From the navigation pane, click Menu Access > Create New Menu.
    2. Enter the name for the first menu. For example, Hive_Dashboard.
    3. Right-click Hive_Dashboard and select Add Child.
    4. Click the Dashboard dashboard icon icon and drag Hive dashboard that you created from the list on the Dashboard tab, which is on the right of the window.
    5. Click the User Groups tab and assign the user groups who can view this dashboard.
    6. Save and publish the dashboard.

      For more information, see Menu Access.

  12. Access the Engine user interface.
  13. Go to Hive_Dashboard > Hive to view your dashboard.