What is the AWS Glue Data Catalog and how does it relate to Athena?
Short answer
The AWS Glue Data Catalog acts as a central metadata repository that stores information about the structure and location of your data, such as table schemas and partition details, and Athena relies directly on this catalog to know how to interpret the raw files sitting in S3 as…
Advertisement
AModel answer
The AWS Glue Data Catalog acts as a central metadata repository that stores information about the structure and location of your data, such as table schemas and partition details, and Athena relies directly on this catalog to know how to interpret the raw files sitting in S3 as structured tables that can be queried with SQL.
Example
aws glue create-table --database-name mydb --table-input file://table-definition.json
Real-world example
A data engineering team uses a Glue crawler to automatically scan a folder of JSON files in S3 and populate the Glue Data Catalog, allowing analysts to immediately query that same data through Athena.
Likely follow-ups
- What is a Glue crawler and how does it discover schemas automatically?
- Can Athena work without the Glue Data Catalog?
Related topics