How to Join Tables in Amazon Glue
Here We Show How to Join Two Tables in Amazon Glue. We Make a Crawler and Then Write Python Code to Create a Glue Dynamic Dataframe to Join the Two Tables...
Here we show how to join two tables in Amazon Glue. We make a crawler and then write Python code to create a Glue Dynamic Dataframe to join the two tables.
First, we’ll share some information on how joins work in Glue, then we’ll move onto the tutorial. You can start with the basics on Amazon Glue Crawlers, but we are going to modify the procedure described there to fit the data we have prepared below.
Brief intro to Amazon Glue
Glue is not a database. It basically contains nothing but metadata. You point it at a data source and it vacuums up the schema. Or you create the schema manually. The data exists in
Glue processes data sets using Apache Spark, which is an in-memory database. Then you can write the resulting data out to S3 or mysql, PostgreSQL, Amazon Redshift, SQL Server, or Oracle.
Glue can crawl these data types:
- JSON
- CSV
- Parquet
- Avro
- XML
Must Read
What is a join?
First, join means to take two tables and join them by a common element. Joining two tables is an important step in lots of ETL operations.
A join is a SQL operation that you could not perform on most noSQL databases, like DynamoDB or MongoDB. noSQL databases don’t usually allow joins because it is an expensive operation that takes a lot of time, disk space, and memory.