Get started - Amazon Athena
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Get started

To be queryable, your Delta Lake table must exist in Amazon Glue. If your table is in Amazon S3 but not in Amazon Glue, run a CREATE EXTERNAL TABLE statement using the following syntax. If your table already exists in Amazon Glue (for example, because you are using Apache Spark or another engine with Amazon Glue), you can skip this step.

CREATE EXTERNAL TABLE [db_name.]table_name LOCATION 's3://amzn-s3-demo-bucket/your-folder/' TBLPROPERTIES ('table_type' = 'DELTA')

Note the omission of column definitions, SerDe library, and other table properties. Unlike traditional Hive tables, Delta Lake table metadata are inferred from the Delta Lake transaction log and synchronized directly to Amazon Glue.

Note

For Delta Lake tables, CREATE TABLE statements that include more than the LOCATION and table_type property are not allowed.