5.12. Using Apache Superset
Basic Usage for Presto on AWS
Login to Superset
- 1. CloudFormation Console
- Navigate to the CloudFormation Console under “Management Tools” within the Services menu.
- 2. Outputs
Select your “Stack Name” and click the associated tab labeled “Outputs”.
- 3. Retrieve Superset Password
- Find and copy the “Superset Admin Password”.
- 4. Superset URL
- Locate and click the “Public Superset URL”.
- 5. Complete Login
- Once at the sign in page, enter “admin” within the username field and your copied Superset password into the password field. You will then be redirected to the Superset dashboards page.
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 “tpch” database. Move down to the schema drop-down menu and choose “sf1”.
- 3. Add Table
Under the add a table drop-down menu select “customer” to get a sense for the data you will be working on. Immediately, you should be presented with a preview of the customer table.
- 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”.
- 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.
Visualization and Dashboard Demonstration
- 1. Results → Visualization
- 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 “Pie Chart”.
- Under the agg_func drop-down menu select “AVG(x)” for the column Avg_Price.
- Click “Visualize”.
- 3. Finalize Visualization
You will be directed to a new page containing your preliminary visualization.
- Navigate to the “Data” tab in the upper left-hand corner of the page to further tailor your graph.
- Under the Group by drop-down menu deselect “Avg_Acct_Bal” and select “mktsegment”.
- Double click on the “undefined - untitled” title on the visualization and type a new title.
- A popup will appear prompting you to implement these changes. Click “Run Query”.
- 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.
Superset Documentation Reference
To learn more about Apache Superset and additional functions refer to their documentation.