Visualize Interactive Query Hive data with Microsoft Power BI using direct query in Azure HDInsight
Learn how to connect Microsoft Power BI to Azure HDInsight Interactive Query clusters and visualize the Hive data using direct query. In this tutorial, you load the data from a hivesampletable Hive table to Power BI. The Hive table contains some mobile phone usage data. Then you plot the usage data on a world map:
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.
Before going through this article, you must have the following items:
- HDInsight cluster. The cluster can be either an HDInsight cluster with Hive or a newly released Interactive Query cluster. For creating clusters, see Create cluster.
- Microsoft Power BI Desktop. You can download a copy from the Microsoft Download Center.
Load data from HDInsight
The hivesampletable Hive table comes with all HDInsight clusters.
- Sign in to Power BI Desktop.
Click the Home tab, click Get Data from the External data ribbon, and then select More.
- 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.
- Click HDInsight Interactive Query (Beta), and then click Connect.
- Click Continue to close the Preview connector warning dialog.
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.
- Click OK.
- Enter the HTTP user credential, and then click OK. The default username is admin
From the left pane, select hivesampletale, and then click Load.
Continue from the last procedure.
From the Visualizations pane, select Map. It is a globe icon.
- From the Fields pane, select country and devicemake. You can see the data plotted on the map.
- Expand the map.
In this article, you learned how to visualize data from HDInsight using Power BI. To learn more, see the following articles:
- Visualize Hive data with Microsoft Power BI using ODBC in Azure HDInsight.
- Use Zeppelin to run Hive queries in Azure HDInsight.
- Connect Excel to HDInsight with the Microsoft Hive ODBC Driver.
- Connect Excel to Hadoop by using Power Query.
- Connect to Azure HDInsight and run Hive queries using Data Lake Tools for Visual Studio.
- Use Azure HDInsight Tool for Visual Studio Code.
- Upload Data to HDInsight.