All streams, pipelines, and connections support the following data types. When you are defining the schema of your data, you can specify the following data types for your fields.
Binary Types
Type
Description
BINARY(n)
Fixed length binary string.
VARBINARY(n)
Variable length binary string with a max length of n.
BYTES
Synonym for VARBINARY(2147483647).
Compound Types
Type
Description
ARRAY<T>
An array of a type T, and a maximum size of 2^31-1.
T ARRAY
Synonym for ARRAY<T>.
MAP<K,V>
An associative array with keys of type K and values of type V. Both K and V support any type. Each unique key can only have one value.
ROW<nametype ['description'], ...>
A structure of named fields. name is the field name, type is its type, and description is an optional text description of the field. Field definitions can be repeated as many times as necessary.
Date and Time Types
Type
Description
DATE
A date containing the year, month, and day.
TIME(p)
A time without a timezone. If specified, p indicates the precision of fractional seconds up to nanosecond-level precision. Does not support leap second adjustments. Values must be within the range of 00:00:00 to 23:59:59.
TIMESTAMP(p) [[WITH\WITHOUT] TIME ZONE]
A date and time with or without a timezone. As with TIME, p specifies the fractional second precision, if it is provided. Values must be within the range of 0000-01-01 00:00:00 to 9999-12-31 23:59:59.999999999.
TIMESTAMP_LTZ(p)
A synonym for TIMESTAMP(p) WITH LOCAL TIME ZONE.
Numeric Types
Type
Description
DECIMAL(p,s)
Exact numeric type with a fixed precision (number of digits) of p and a scale (number of digits to the right of the decimal) of s.
p must be in the range of 1 to 31, inclusive. If omitted, it defaults to 10.
s must be in the range of 0 to p, inclusive. If s is specified, p must also be specified. When omitted, it defaults to 0.
DEC(p,s)
Synonym for DECIMAL(p,s).
NUMERIC(p,s)
Synonym for DECIMAL(p,s).
TINYINT
A 1 byte signed integer.
SMALLINT
A 2 byte signed integer.
INT
A 4 byte signed integer.
BIGINT
An 8 byte signed integer.
FLOAT
An approximate floating point integer.
DOUBLE parameters
Synonym for FLOAT.
Other Types
Type
Description
BOOLEAN
A true / false value.
INTERVAL
A data type for a group of year to month or day to month interval types.
MULTISET
String Types
Type
Description
CHAR(n)
Fixed length character string.
VARCHAR(n)
Variable length character string with a max length of n.