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


    • INT. Athena combines two different implementations of the Integer data type. In Data Definition Language (DDL) queries, Athena uses the INT data type. In all other queries, Athena uses the INTEGER data type. In the JDBC driver, INTEGER is returned, to ensure compatibility with the business analytics applications.

    • BIGINT


    • DOUBLE

    • FLOAT

    • STRING


    • 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] [, ...] >

For information about supported data type mappings between types in Athena, the JDBC driver, and Java data types, see the "Data Types" section in the JDBC Driver Installation and Configuration Guide.