Creating an Athena table
AWS includes the SQL that you need to run to create this table in your AWS CUR bucket.
To create your Athena table
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/
. -
From the list of buckets, choose the bucket where you chose to receive your Cost and Usage Reports.
-
Navigate the path
.your-report-prefix
-your-report-name
-path-to-report
The exact path depends on whether your AWS CUR is set to overwrite previous versions. For more information, see Cost and Usage Reports delivery timeline.
-
Open the file
.my-report-name
-create-table.sql -
Copy the SQL from the file, starting with
CREATE
and ending withLOCATION 's3://
. Take note of the first line, as you need the database name and table to create the Athena database.your-report-prefix
/your-report-name
/the-rest-of-the=path
' Open the Athena console at https://console.aws.amazon.com/athena/
. -
In the New query 1 query pane, paste the following SQL. For
, use the database and table name from the first line of the SQL that you copied.<database name>.<table name>
CREATE DATABASE <database name>
-
Choose Run query.
-
In the dropdown menu, choose the database that you just created.
-
In the New query 1 query pane, paste the rest of the SQL from the SQL file.
-
Choose Run query.
After you create your table, you need to load your partitions before you can run a query. For more information, see Uploading your report partitions.