Amazon Athena
User Guide

Names for Tables, Databases, and Columns

Use these tips for naming items in Athena.

Table names and table column names in Athena must be lowercase

If you are interacting with Apache Spark, then your table names and table column names must be lowercase. Athena is case-insensitive and turns table names and column names to lower case, but Spark requires lowercase table and column names.

Queries with mixedCase column names, such as profileURI, or upper case column names do not work.

Athena table, database, and column names allow only underscore special characters

Athena table, database, and column names cannot contain special characters, other than underscore (_).

Names that begin with an underscore

Use backtics to enclose table or column names that begin with an underscore. For example:

CREATE TABLE `_myunderscoretable` ( `_id` string, `_index`string, ...

Table names that include numbers

Enclose table names that include numbers in quotation marks. For example:

CREATE TABLE "table123" `_id` string, `_index` string, ...