Visualize Interactive Query Hive data with Microsoft Power BI using direct query in Azure HDInsight

This article describes how to connect Microsoft Power BI to Azure HDInsight Interactive Query clusters and visualize Apache Hive data using direct query. The example provided loads the data from a hivesampletable Hive table to Power BI. The hivesampletable Hive table contains some mobile phone usage data. Then you plot the usage data on a world map:

HDInsight Power BI the map report

You can leverage the Hive ODBC driver to do import via the generic ODBC connector in Power BI Desktop. However it is not recommended for BI workloads given non-interactive nature of the Hive query engine. HDInsight Interactive Query connector and HDInsight Spark connector are better choices for their performance.

Prerequisites

Before going through this article, you must have the following items:

Load data from HDInsight

The hivesampletable Hive table comes with all HDInsight clusters.

  1. Sign in to Power BI Desktop.

  2. Click the Home tab, click Get Data from the External data ribbon, and then select More....

    HDInsight Power BI open data

  3. From the Get Data pane, type hdinsight in the search box. If you don't see HDInsight Interactive Query (Beta), you need to update your Power BI Desktop to the latest version.

  4. Select HDInsight Interactive Query (Beta), and then select Connect.

  5. Select Continue to close the Preview connector warning dialog.

  6. From HDInsight Interactive Query, select or enter the following information:

    • Server: Enter the Interactive Query cluster name, for example myiqcluster.azurehdinsight.net.

    • Database: For this tutorial, enter default.

    • Data Connectivity mode: For this tutorial, select DirectQuery.

      HDInsight interactive query Power BI DirectQuery connect

  7. Click OK.

  8. Enter the HTTP user credential, and then click OK. The default username is admin

  9. From the left pane, select hivesampletale, and then click Load.

    HDInsight interactive query Power BI hivesampletable

Visualize data on a map

Continue from the last procedure.

  1. From the Visualizations pane, select Map. It is a globe icon.

    HDInsight Power BI customizes report

  2. From the Fields pane, select country and devicemake. You can see the data plotted on the map.

  3. Expand the map.

Next steps

In this article, you learned how to visualize data from HDInsight using Power BI. For more information on data visualization, see the following articles: