Visualize with QuickSight using Athena

In this lab, we will build an Amazon QuickSight Dashboard that uses Amazon Athena to access data.

Important

Before setting up QuickSight, we need to log out of AWS and log back in with a user that has the appropriate permissions.

To log out:

  1. Click the username in the top right-hand corner of the page.
  2. Click the Sign Out button. Connect

Log back into your AWS Console as an IAM user that has permissions to set up QuickSight.

Set up QuickSight

Once logged back in, follow these steps to set up Amazon QuickSight:

  1. Take note of the AWS Region where you are running the lab. This is shown in the top menu bar.
    Connect

  2. Search for QuickSight in the AWS search bar and select QuickSight from the results. This will take you to the QuickSight landing page.
    Connect

  3. If your AWS account is not signed up for QuickSight, click Sign up for QuickSight.
    Connect

  4. On the Sign Up for QuickSight screen, complete the following fields:

    • Email for Account Notifications: Enter an email address.
    • QuickSight Region: Choose the region matching your lab setup.
      Connect
    • QuickSight Account Name: Enter a unique name (only letters, numbers, and dashes are allowed).
      Connect
  5. In the QuickSight Access to AWS Services section:

    • Check Amazon Athena.
    • Check Amazon S3 (A popup will appear to select S3 buckets). Click Select All, then Finish.
      Connect
  6. In the Optional Add-On section, uncheck “Add Pixel-Perfect reports”.

  7. Click the Finish button.

  8. Once completed, you should see an Account created successfully message.
    Connect

  9. Click Go to QuickSight to load QuickSight.


Create a QuickSight Dataset

We will create a new dataset for our QuickSight dashboard that connects to a table in Athena.

  1. Click New Analysis (top right corner).
    Connect

  2. Click New dataset (top left corner).
    Connect

  3. Locate the Athena icon and click it.
    Connect

  4. For Data source name, type athenaimmersion and click Create Data Source.
    Connect

  5. On the next screen, select the default database and choose athena_glue_sale table. Click Select.
    Connect

  6. On the finish data set creation screen, choose Query your data directly and click Visualize.
    Connect

  7. You will now see the QuickSight analysis editor.
    Connect


Create QuickSight Charts

We will create a simple analysis using our price dataset.

Create a Bar Chart

  1. From Fields List, drag the month field onto AutoGraph.
  2. QuickSight will automatically select a Horizontal Bar Chart displaying count of price records by month.
    Connect

Create a Line Chart

  1. Click in the grey space below the existing Bar Chart.

  2. Set the Value as month, and the Color as year.
    Connect

  3. The chart will display the data as shown below:
    Connect

  4. Repeat this process to display the data for price by month and year.
    Connect

  5. Try changing the chart type and settings as desired.


Conclusion

You have successfully used Amazon QuickSight to connect to your data via Amazon Athena and created a visual analysis.