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.
Name | Description | Examples |
---|---|---|
bool | TRUE or FALSE | FALSE |
int, integer | 8-byte signed integer in the range -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. | 100000 |
string | UTF8-encoded variable-length string. The default limit is one character. The maximum character limit is 2,147,483,647. | 'xyz' |
float | 8-byte floating point number. | CAST(0.456 AS FLOAT) |
decimal, numeric |
Base-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 |
timestamp |
Time 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 |
CAST('2007-04-05T14:30Z' AS TIMESTAMP) |