Articles → AWS → Athena in AWS

Athena in AWS






Purpose





Steps




  1. Create a sample CSV file.
  2. Upload the CSV file on the S3 bucket.
  3. Bind Athena with S3 bucket.
  4. Create a database and table from S3 bucket.
  5. Query the data using SQL.



Create a sample CSV file




Picture showing the sample csv file

Click to Enlarge


Upload the CSV file on the S3 bucket.




Picture showing the CSV file uploaded on the S3 bucket

Click to Enlarge


Bind Athena with S3 bucket




Picture showing Athena in the search result of the AWS console

Click to Enlarge



Picture showing the Explore the query editor button for opening the query editor

Click to Enlarge



Picture showing the View settings button for opening the settings screen

Click to Enlarge



Picture showing the Manage button for editing the settings

Click to Enlarge



Picture showing specifying the bucket address from which CSV will be read

Click to Enlarge


Create a database and table from S3 bucket




Picture showing creating the data source from the S3 bucket

Click to Enlarge



Picture showing creating the table in the S3 bucket data source

Click to Enlarge



Picture showing adding the database name and the S3 bucket address while creating the table

Click to Enlarge



Picture showing selecting the file format while creating the table

Click to Enlarge



Picture showing entering the column details for the table

Click to Enlarge



Picture showing the Create table button for creating the new table

Click to Enlarge


Query the data using SQL




Picture showing firing the select query on the data source

Click to Enlarge



Picture showing the result of the select query

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, November 1, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250