Query Amazon Glue data catalogs in Athena
To query data catalogs from Athena, do one of the following.
-
Register the catalog in Athena as a data source, then use the data source name to query the catalog. In this usage, the following queries are equivalent.
SELECT * FROM my_data_source.my_database.my_table
If you are querying a catalog that has not been registered as an Athena data source, you can supply the full path to the catalog in your
SELECT
queries, as in the following example.SELECT * FROM "my_catalog/my_subcatalog".my_database.my_table
-
You can also do this through the Athena console.
-
Open the Athena console at https://console.aws.amazon.com/athena/
-
In the query editor, for Data source, choose AwsDataCatalog.
-
For Catalog, choose the name of the catalog that you want to use.
-
For Database, choose the database that contains the table that you want to query.
-
Enter a query like
SELECT * FROM
, and then choose Run.my_table
-