Analysis with Athena

Analysis with Athena

As Athena uses the AWS Glue Catalog to track data sources, all tables in Glue can be queried through Athena.

If this is your first time using Athena, you may need to configure a query result location in S3. Go to Settings in the Athena console and set an S3 path (e.g., s3://your-bucket/athena-results/) before running queries.

  1. Access the AWS Management Console.

    • Search for Athena.
    • Select Athena.

    Analyze Data with Athena

  2. In the Athena interface:

    • Under Data Source, select AwsDataCatalog.

    • Under Database, choose summitdb.

    • Execute the following SQL query:

      SELECT artist_name,
             count(artist_name) AS count
      FROM processed_data
      GROUP BY artist_name
      ORDER BY count DESC
      
    • Press Run Query.

    Analyze Data with Athena

    • Wait until the status changes to Complete.
    • View the results of the query, showing the artists with the most plays.

    Analyze Data with Athena

  3. Explore the Athena interface and try executing another query.

    • The query below will return a list of songs that have been played multiple times across different devices. You can use insights from this query to create a chart in Amazon Quick later.

      SELECT device_id,
             track_name,
             count(track_name) AS count
      FROM processed_data
      GROUP BY device_id, track_name
      ORDER BY count DESC
      
    • Press Run Query.

    Analyze Data with Athena

    • View the results showing device playback counts for tracks.

    Analyze Data with Athena