Using S3 Select for Query Data Lab Guide
- Download this file
- Open the AWS Management Console and navigate to the S3 console.
- Select the bucket containing the CSV file you want to query.
- Select the CSV file you want to query.
- Click on the “Actions” drop-down menu and select “Select from Object”.
- In the “Select from Object” dialog box, you can choose to run a simple SQL expression or an advanced SQL expression. For this lab, we will use a simple SQL expression.
- Enter the SQL expression you want to use to query the data. For example, if you have a CSV file with columns “Name”, “Age”, and “Address”, and you want to retrieve all records where the age is greater than or equal to 18, you can use the following SQL expression:
SELECT * FROM S3Object s WHERE s.Age >= 18
- Click on the “Preview” button to preview the query results.
- If you are satisfied with the results, you can click on the “Download Results” button to download the query results as a CSV file.