Menu
Amazon Athena
User Guide

Data Types

When you run CREATE TABLE, you must specify column names and their data types. For a complete syntax of this command, see CREATE TABLE.

The field col_name specifies the name for each column in the table Athena creates, along with the column's data type. If col_name begins with an underscore, enclose it in backticks, for example `_mycolumn`.

List of Supported Data Types in Athena

The data_type value in the col_name field of CREATE TABLE can be any of the following:

  • primitive_type
    • TINYINT

    • SMALLINT

    • INT

    • BIGINT

    • BOOLEAN

    • DOUBLE

    • FLOAT

    • STRING

    • TIMESTAMP

    • DECIMAL [ (precision, scale) ]

    • DATE (not supported for PARQUET file_format)

    • CHAR. Fixed length character data, with a specified length between 1 and 255, such as char(10). For more information, see CHAR Hive Data Type.

    • VARCHAR. Variable length character data, with a specified length between 1 and 65535, such as varchar(10). For more information, see VARCHAR Hive Data Type.

  • array_type
    • ARRAY < data_type >

  • map_type
    • MAP < primitive_type, data_type >

  • struct_type
    • STRUCT < col_name : data_type [COMMENT col_comment] [, ...] >