Querying the ODL using AWS Athena
In this section, we will learn how to perform data querying on the ODL that we have created using our architecture. We will focus on how to set up Athena on our output folder to do easy data discovery and querying:
- Navigate to AWS Athena via the AWS Management Console. Click on Explore the query editor. First, go to the Manage settings form of the Query editor area and set up an S3 bucket where the query results can be stored. You can create an empty bucket for this purpose:
Figure 5.26 – Setting up AWS Athena
- We will create an Athena table on top of our S3 output bucket. For this, we will create a DDL to create a table called
ecom_odl
, which is a partitioned table on theyear
andmonth
columns. The DDL of the table can be seen in the following code snippet:CREATE EXTERNAL TABLE IF NOT EXISTS ecom_odl( Â Â Â Â Â category_id bigint, Â Â Â Â Â product_id bigint,...