Data Types
The Data Cloud SQL type system includes two groups of types.
- Atomic types that describe single values
- Composite types that describe collections of values
Atomic types are basic data types. This table lists all available atomic types.
Name | Aliases | Description |
---|---|---|
BIGINT | INT8 | Signed eight-byte integer |
BOOLEAN | BOOL | Boolean value with ternary logic (true/false/unknown) |
BYTES | Binary data (“byte array”) | |
CHARACTER [ (n) ] | CHAR [ (n) ] | Fixed-length character string |
CHARACTER VARYING (n) | VARCHAR (n) | Variable-length character string with limit |
DATE | Calendar date (year, month, day) | |
REAL | FLOAT4 | Single-precision floating-point number (4 bytes) |
DOUBLE PRECISION | FLOAT , FLOAT8 | Double-precision floating-point number (8 bytes) |
INTEGER | INT , INT4 | Signed four-byte integer |
INTERVAL | Time span, not supported in Tableau | |
NUMERIC [ (p, s) ] | DECIMAL [ (p, s) ] | Exact numeric of selectable precision |
SMALLINT | INT2 | Signed two-byte integer |
TEXT | Variable-length character string | |
TIME [ WITHOUT TIME ZONE ] | Time of day (no time zone) | |
TIMESTAMP [ WITHOUT TIME ZONE ] | Date and time (no time zone) | |
TIMESTAMP WITH TIME ZONE | TIMESTAMPTZ | Date and time, including time zone |
GEOGRAPHY | A geography object |
Persisting NUMERIC
values into .hyper
files with a precision greater than 18 by using Tableau Hyper API requires at least database version 3.
Persisting 32-bit floating point values into .hyper
files by using Tableau Hyper API requires at least database version 4.
Composite types are collections of multiple data items in a single SQL value. You can use them for dedicated schema denormalization, which is useful for specific domains, such as machine learning applications. Data Cloud SQL supports the array composite type.
An array is an ordered sequence of values. Arrays in Data Cloud SQL are strongly typed and can be built from all supported atomic types. For more details, see Array Type.