This subsection is only relevant in case of BYOA (bring your own AWS account) and prepares the AWS account for using Amazon Quicksight.
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.
Select the Standard configuration.
Scroll down to the bottom of the page and click the Continue button.
Click the Choose S3 buckets link on the next page and select Amazon S3 bucket that holds all data about your call recordings.
Enter all other required information and make sure you select the US East (N. Virginia) region. Click the Finish button.
Your Amazon Quicksight account is being created.
After a few moments, you’re all set to use Amazon Quicksight.
After you ran through the above preparation of your own account or if you received a prepared account from your workshop facilitators, you can continue with the following steps. In case you bring your own AWS account (BYOA) and have never used Amazon Quicksight before, scroll up to the Account preparation in case of BYOA subsection.
Let’s go to the Amazon Quicksight console. The splash screen should look similar to the illustration below. Make sure the right region (Northern Virginia) is selected in the upper right corner. Click the New analysis button.
On the next screen, click the New data set button.
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.
We’are asked to provide a name to our data source. Please use
Then click the Validate connection button to double check that Amazon Quicksight is entitled to interact with Amazon Athena on your behalf.
When you work with a prepared account, this connectivity was pre-configured for you. If you’re going with BYOA, you have done this configuration yourself before.
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 in another tab to have the names at hand. Once you have selected the right database, 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.
Now you can enter your customer 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 customer SQL query we’re going to use now will unnest these values.
Please use the following query and replace
<YOUR DATABASE NAME> with your virtual database that contains your
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)
In the illustration below, the name of the database is
comprehendgluedatabase-ydfjtr5hewwm. Your name should be similar.
Click the Confirm query button to continue.
In the Finish data set creation dialog, leave everything untouched and click the Visualize button.
On the screen you land now, please check the box on the right hand side. When its title is 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.
Select the sentiment and the talker fields and see how they are visualized in the AutoGraph tile.
Open the drop down list in the upper right corner of the AutoGraph tile and click the Maximize option.
Now you can see also the color codes for the diagram. In the illustration below you can see that the sample data we had was by coincidence in a way that all customer sentiment was negative and all agent sentiment was neutral. How does your visualization look like?
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.