4.9. Using Apache Superset

Login to Apache Superset

Apache Superset is running on the Azure HDInsight edge node at the URL:

https://<cluster-name>-set.apps.azurehdinsight.net.

Replace “cluster-name” with the actual name of your cluster.

Navigate to that URL and you’ll be prompted to enter the HDInsight username and password. Once you authenticate to Azure HDInsight, you’ll be brought to the login for Apache Superset. The default username is admin. The default password is admin.

../_images/superset_login.png

Query Demonstration - SQL Editor

1. SQL Editor

Navigate to the “SQL Lab” drop-down menu at the top of the page. Click “SQL Editor”.

2. Specify Database and Schema

Select the database drop-down menu, and click the “hive” database. Move down to the schema drop-down menu and choose “default”.

3. Add Table

Under the add a table drop-down menu select “hivesampletable” to get a sense for the data you will be working on. Immediately, you should be presented with a preview of the hivesampletable table.

../_images/superset_table.png

4. Write the Query

Type the SQL code, from the screenshot below, into the window.

5. Run the Query

When finished typing and reviewing the SQL code, press “Run Query”.

../_images/superset_query_1.png

6. View Results

When done processing, Superset will display the results of your query under the “Results” tab below the query window, as shown in the screenshot below.

../_images/superset_results.png

Visualization and Dashboard Demonstration

1. Results → Visualization

Let’s visualize the same results. The chart we will create in Superset will create a query similar to the one we just wrote. Therefore, we need simplify the data the chart we are using to visualize will use.

../_images/superset_query_2.png

From the Results tab navigate to the “Visualize” button located just above your results.

2. Specify Visualization

You will be presented with a visualization specification window.

Under the chart type drop-down menu select “Distribution Bar Chart”. Click “Visualize”.

../_images/superset_visualize1.png

3. Finalize Visualization

You will be directed to a new page containing your preliminary visualization.

Style:

  • Select the “Style” tab directly next to the current “Data” tab to customize the aesthetics of your visualization.
  • Under the Label Type drop-down menu select “value”.
  • If you desire, further specify the colors of the wedges and location of the labels.

4. Save to Dashboard

When content, navigate to the “save” button at the top, left-hand corner of the page. You will be presented with a popup “ Save A Chart” window. From here, name the chart and specify a dashboard to save it to. If you don’t have an existing dashboard or wish to save it to a new one, name and add a new dashboard.

../_images/superset_save_chart1.png ../_images/superset_view_chart.png

To learn more about Apache Superset and additional functions refer to their documentation