Data types
Each value that AWS Clean Rooms stores or retrieves has a data type with a fixed set of associated properties. Data types are declared when tables are created. A data type constrains the set of values that a column or argument can contain.
The following table lists the data types that you can use in AWS Clean Rooms tables.
Data type | Aliases | Description |
---|---|---|
ARRAY | Not applicable | Array nested data type |
BIGINT | Not applicable | Signed eight-byte integer |
BOOLEAN | BOOL | Logical Boolean (true/false) |
CHAR | CHARACTER | Fixed-length character string |
DATE | Not applicable | Calendar date (year, month, day) |
DECIMAL | NUMERIC | Exact numeric of selectable precision |
DOUBLE PRECISION | FLOAT8, FLOAT | Double precision floating-point number |
INTEGER | INT | Signed four-byte integer |
MAP | Not applicable | Map nested data type |
REAL | FLOAT4 | Single precision floating-point number |
SMALLINT | Not applicable | Signed two-byte integer |
STRUCT | Not applicable | Struct nested data type |
SUPER | Not applicable | Superset data type that encompasses all scalar types of AWS Clean Rooms including complex types such as ARRAY and STRUCTS. |
TIME | Not applicable | Time of day |
TIMETZ | Not applicable | Time of day with time zone |
VARBYTE | VARBINARY, BINARY VARYING | Variable-length binary value |
VARCHAR | CHARACTER VARYING | Variable-length character string with a user-defined limit |
Note
The ARRAY, STRUCT, and MAP nested data types are currently only enabled for the custom analysis rule. For more information, see Nested type.
Multibyte characters
The VARCHAR data type supports UTF-8 multibyte characters up to a maximum of four bytes. Five-byte or longer characters are not supported. To calculate the size of a VARCHAR column that contains multibyte characters, multiply the number of characters by the number of bytes per character. For example, if a string has four Chinese characters, and each character is three bytes long, then you will need a VARCHAR(12) column to store the string.
The VARCHAR data type doesn't support the following invalid UTF-8 codepoints:
0xD800 – 0xDFFF
(Byte sequences: ED A0 80
–
ED BF BF
)
The CHAR data type doesn't support multibyte characters.