Data types
Important
Amazon S3 Select is no longer available to new customers. Existing customers of Amazon S3 Select can continue to use the feature as usual. Learn more
Amazon S3 Select supports several primitive data types.
Data type conversions
The general rule is to follow the CAST
function if it's defined. If
CAST
is not defined, then all input data is treated as a string. In
that case, you must cast your input data into the relevant data types when
necessary.
For more information about the CAST
function, see CAST.
Supported data types
Amazon S3 Select supports the following set of primitive data types.
Name |
Description |
Examples |
---|---|---|
|
A Boolean value, either |
|
|
An 8-byte signed integer in the range -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. |
|
|
A UTF8-encoded variable-length string. The default limit is 1 character. The maximum character limit is 2,147,483,647. |
|
|
An 8-byte floating point number. |
|
|
A base-10 number, with a maximum precision of 38 (that is, the maximum number of significant digits), and with a scale within the range of -231 to 231-1 (that is, the base-10 exponent). NoteAmazon S3 Select ignores scale and precision when you provide both at the same time. |
|
|
Timestamps represent a specific moment in time, always include a local offset, and are capable of arbitrary precision. In the text format, timestamps follow the W3C note on date
and time formats |
|
Supported Parquet types
Amazon S3 Select supports the following Parquet types.
-
DATE
-
DECIMAL
-
ENUM
-
INT(8)
-
INT(16)
-
INT(32)
-
INT(64)
-
LIST
Note
For
LIST
Parquet type output, Amazon S3 Select supports only JSON format. However, if the query limits the data to simple values, theLIST
Parquet type can also be queried in CSV format. -
STRING
-
TIMESTAMP
supported precision (MILLIS
/MICROS
/NANOS
)Note
Timestamps saved as an
INT(96)
are unsupported.Because of the range of the
INT(64)
type, timestamps that are using theNANOS
unit can represent only values between1677-09-21 00:12:43
and2262-04-11 23:47:16
. Values outside of this range cannot be represented with theNANOS
unit.
Mapping of Parquet types to supported data types in Amazon S3 Select
Parquet types |
Supported data types |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Each Parquet type in list is mapped to the corresponding data type. |
|
|
|
|