AWS Glue para Principiantes Desarrolla tu Primer Pipeline ETL
Introduction to ETL Process
Overview of the Lab
- The presenter, Carlos Zambrano, introduces the lab focused on ETL (Extract, Transform, Load), explaining that data will be loaded into an S3 bucket and subsequently transformed and queried.
Setting Up AWS Glue
- Carlos opens the AWS Glue console and prepares for the lab by showing the repository where all necessary information is located.
- He navigates to create source and target buckets in Amazon S3 for the lab's data handling.
Creating S3 Buckets
Bucket Creation Steps
- Carlos names the source bucket "CloudCAM Source Oregon" and creates a corresponding target bucket named "CloudCAM Target Oregon."
- Both buckets are confirmed as created successfully in the Oregon region within Amazon S3.
Preparing Data Files
Downloading Required Files
- Participants are instructed to clone a GitHub repository containing essential files: Python scripts and CSV files for products and sales.
Uploading Data to S3
- Carlos uploads both product.csv and sales.csv files into the source bucket after navigating through his local repository.
Using Crawler for Data Cataloging
Initiating Crawler Setup
- The next step involves using a crawler service that identifies data formats and loads them into Glue Data Catalog.
Configuring Crawler Settings
- A new crawler named "crawler Oregon" is created with a description indicating its purpose of identifying data structure in the source bucket.
Defining Data Sources
Specifying Source Path
- Carlos specifies the path to "CloudCam Source Oregon" as the data source for crawling operations.
Role Assignment for Permissions
- An IAM role with permissions on S3 is assigned to allow access for reading CSV files during crawling.
Creating Database in Glue Catalog
Database Creation Process
- A new database named "DB Oregon" is added to store crawled tables from identified datasets within Glue Data Catalog.
Running Crawler
Executing Crawling Operation
- The crawler is executed to scan through specified folders, identify structures, and load them into Glue Data Catalog.
Verifying Crawled Tables
Checking Created Tables
- After successful execution, two tables—Product CSB and Sale CSB—are automatically generated in DB Oregon based on uploaded CSV files.
Querying with Athena
Utilizing Athena Service
- Carlos demonstrates how to use Athena as a query engine connected to AWS Glue Data Catalog, allowing users to run SQL queries against their datasets.
Setting Up ETL Job
Creating ETL Job Script
- In preparation for transforming data, an ETL job script is created using code from GitHub that outlines how transformations will occur.
Modifying Script Parameters
-Carlos modifies specific lines in the script related to database names (DB Oregon), ensuring they match existing configurations before saving changes.
Finalizing Job Details
-The job details include setting up descriptions, worker types, retry settings, while ensuring monitoring options via CloudWatch are enabled.
Executing Transformation Job
-Carlos runs the newly created ETL job which processes input from Glue catalog tables into transformed outputs stored back in S3 as Parquet format.
Converting Output Format
- The transformation process converts CSV inputs into Parquet format due to its efficiency regarding compression and speed compared with traditional CSV files.
Running Another Crawler on Transformed Files
- A second crawler named “target Oregon” is set up specifically designed to discover newly generated Parquet files within target buckets post-transformation.
Reviewing Merged Outputs
- Finally, results are reviewed through Athena showcasing merged fields based on specifications outlined during transformation steps confirming successful completion of tasks performed throughout this lab session.
Turn any video into a summary like this
YouTube links, meetings, lectures. With transcripts, search, and chat.