s3-glacier-select-sql-reference-data-types

Data Types

Amazon S3 Select and S3 Glacier Select support several primitive data types.

Data Type Conversions

The general rule is to follow the CAST function if defined. If CAST is not defined, then all input data is treated as a string. It must be cast into the relevant data types when necessary.

For more information about the CAST function, see CAST.

Supported Data Types

Amazon S3 Select and S3 Glacier Select support the following set of primitive data types.

NameDescriptionExamples
boolTRUE or FALSEFALSE
int, integer8-byte signed integer in the range -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.100000
stringUTF8-encoded variable-length string. The default limit is one character. The maximum character limit is 2,147,483,647.'xyz'
float8-byte floating point number.CAST(0.456 AS FLOAT)
decimal, numericBase-10 number, with maximum precision of 38 (that is, the maximum number of significant digits), and with scale within the range of -231 to 231-1 (that is, the base-10 exponent).123.456
timestampTime stamps represent a specific moment in time, always include a local offset, and are capable of arbitrary precision. In the text format, time stamps follow the W3C note on date and time formats, but they must end with the literal "T" if not at least whole-day precision. Fractional seconds are allowed, with at least one digit of precision, and an unlimited maximum. Local-time offsets can be represented as either hour:minute offsets from UTC, or as the literal "Z" to denote a local time of UTC. They are required on time stamps with time and are not allowed on date values.CAST('2007-04-05T14:30Z' AS TIMESTAMP)