Lab 6: Amazon Quicksight

Business intelligence with Amazon Quicksight

Let’s now have a look into a cloud-based BI tool, Amazon Quicksight.

arch.lab6.png

Amazon QuickSight is a fast, cloud-powered business intelligence (BI) service that makes it easy for you to deliver insights to everyone in your organization.

QuickSight lets you create and publish interactive dashboards that can be accessed from browsers or mobile devices. You can embed dashboards into your applications, providing your customers with powerful self-service analytics. QuickSight easily scales to tens of thousands of users without any software to install, servers to deploy, or infrastructure to manage.

With the industry’s first pay-per-session billing model, you only pay for what you use. This allows you to give all of your users access to the data they need without expensive per-seat licenses.

Account preparation

In this section we prepare your AWS account for using Amazon Quicksight.

  1. When you go to the Amazon Quicksight console, it tells you that your AWS account is not signed up to Amazon Quicksight. Click the Sign up for Quicksight button. quicksight.01.png

  2. On the next screen, select Standard configuration. Scroll down to the bottom of the page and click the Continue button. quicksight.02.png

  3. On the next screen, ignore the warning This IAM user or role may not have all the correct permissions to subscribe to QuickSight... if you see it in a red box at the top of the screen. Scroll down and make sure that there is a tick in the check box next to Amazon Athena. Then click directly below on Amazon S3 or Choose S3 buckets and select the name of your processing bucket that holds all data about your call recordings. quicksight.03.png

  4. Also enter a unique value in QuickSight account name and a valid email address in Notification email address and click on the Finish button. Your Amazon Quicksight account is being created.

  5. After a few moments, you’re all set to use Amazon Quicksight. You should see a message similar to Congratulations! You are signed up for Amazon QuickSight! and a button Go to Amazon Quicksight. Click on that button to continue.

Visualize processing results

  1. Now you’re back to the Amazon Quicksight console. In case you see a What's New in Amazon Quicksight pop-up, click on the Close button to continue. Make sure the right region (Northern Virginia) is still selected in the upper right corner. Click the New analysis button in the top left corner.

  2. On the next screen, click the New data set button.

  3. On the next screen you select your data source. In our case, we want to visualize data from an Amazon Athena table. Hence we click the Athena tile.

  4. We’are asked to provide a name to our data source. Please use connect-comprehend.

  5. Then click the Validate connection button to double check that Amazon Quicksight is entitled to interact with Amazon Athena on your behalf. Click the Create data source button to continue.

  6. We need to select the database from Amazon Athena (effectively, it’s provided by AWS Glue) that contains our sentiment analysis table. You can open the Amazon Athena console (or the AWS Glue console) in another tab to have the names at hand. Once you have selected the right database (starting with comprehendgluedatabase), you will see the table named sentiment_analysis that you know already from your previous experiments with Amazon Athena.

    Click the Use custom SQL button to continue, not the Select button.

  7. Now you can enter your custom SQL query. This is required because, as you have seen before when you ran the queries in Amazon Athena, some values in the virtual table contain nested arrays. The custom SQL query we’re going to use now will unnest these values.

    Use an arbitrary name for your query, e.g. sentiment-query, in the text field pre-filled with New custom SQL. Then use the following query for the Enter SQL here... text area and replace <YOUR DATABASE NAME> with your virtual database that contains your sentiment_analysis table.

    WITH sentiment AS (
        SELECT
            contactid,
            talker,
            text,
            sentiment
        FROM
            "<YOUR DATABASE NAME>"."sentiment_analysis"
    )
    
    SELECT
        contactid,
        talker,
        transcript,
        sentimentresult.sentiment,
        sentimentresult.sentimentscore.positive,
        sentimentresult.sentimentscore.negative,
        sentimentresult.sentimentscore.mixed
    FROM
        sentiment CROSS
    JOIN
        UNNEST(text) as t(transcript) CROSS
    JOIN
        UNNEST(sentiment) as t(sentimentresult)

    Click the Confirm query button to continue.

    1. In the Finish data set creation dialog, leave everything untouched and click the Visualize button.

    2. On the screen you land now, please observe the box in the top right corner. When it says Import complete you can start constructing your visualizations. Let’s make use of the AutoGraph tile first, before you can later explore the other options.

    3. Select the sentiment and the talker fields and see how they are visualized in the AutoGraph tile.

    4. Open the drop down list in the upper right corner of the AutoGraph tile and click the Maximize option. If you couldn’t see the color codes for the diagram before, you can now. How does your visualization look like?

    5. You can now play with the various diagram types and explore Amazon Quicksight as you like. Discuss within your team what makes sense to your business.

    Conclusion

    Congratulations!

    You have successfully used Amazon Quicksight to visualize your processing data.