In this tutorial, you'll learn how to query S3 Bucket CSV Data using Athena queries in AWS with Glue.
—
Facebook: [ Ссылка ]
—
Video Transcript:
—
Hi guys, this is Abhi from Gokcedb. In this video, you're going to learn how to query S3 bucket data using Athena in AWS. Let's start by looking at a couple of CSV files. Here, I'm storing property data.
The first column is the property number, and the second column is the proper name followed by size, County, State, and subdivision. I Have some data stored in property underscore data1.csv and other data in property underscore data2.csv. Let's navigate to the S3 service and upload these two files in bucket one.
I'm going to upload the first CSV file in the o1 folder and the second CSV file in o2. Next, let's navigate to the Athena service then click on the settings tab. Hit manage then specify a bucket for the query results.
Click save then navigate to the date sources page. Click on create data source then select S3 AWS glue data catalog then hit next. Choose to create a table manually option then click on create a table.
Give your table a name then enter a name for the database. For input S3 data set, I'm going to select bucket 1 and for the file format. I'm going to select CSV with a comma-separated delimiter in the column details section.
Click on bulk at columns and copy and paste your column names with their data types. Verify your column details then click create a table. Now you can run a query like a select star from the property underscore table to grab all the data from our CSV.
You can also restrict the result set by adding a where Clause. Say where property underscores State equal to NY. There you have it.
Make sure you like, subscribe, and turn on the notification bell. Until next time.
Ещё видео!