Query the Amazon Glue Data Catalog
Because Amazon Glue Data Catalog is used by many Amazon Web Services services as their central metadata repository, you might want to query Data Catalog metadata. To do so, you can use SQL queries in Athena. You can use Athena to query Amazon Glue catalog metadata like databases, tables, partitions, and columns.
To obtain Amazon Glue Catalog metadata, you query the information_schema database
on the Athena backend. The example queries in this topic show how to use Athena to query Amazon Glue
Catalog metadata for common use cases.
Considerations and limitations
-
Instead of querying the
information_schemadatabase, it is possible to use individual Apache Hive DDL commands to extract metadata information for specific databases, tables, views, partitions, and columns from Athena. However, the output is in a non-tabular format. -
Querying
information_schemais most performant if you have a small to moderate amount of Amazon Glue metadata. If you have a large amount of metadata, errors can occur. -
You cannot use
CREATE VIEWto create a view on theinformation_schemadatabase.