Skip to main content

Data Types

In most cases, you don't need to create streams manually or specify the data type for the columns. Timeplus source will automatically create the streams/columns with proper types when you load data from Kafka/CSV/etc.

Like many analytics systems, the following common types are supported.

Beta - Data Types

During our beta, we're supporting a limited number of field types. If there's a specific type that's missing, let us know!

CategoryTypeExampleNoteRelated functions
Numeric Typesinteger-100default with 4 bytes. You can also use int, smallint, bigint, or event uint16 etc.to_int
decimal3.14decimal(precision, scale). Valid range for precision is [1: 76], valid range for scale is [0: precision]to_decimal
float-3.1415default with 4 bytes. You can also use float64 or double for 8 bytesto_float
Boolean Typebooltruetrue or false
String Typestring"Hello"strings of an arbitrary length. You can also use varchar To create string columns with fixed size in bytes, use fixed_string(positiveInt)to_string, etc.
JSON Typejson{"a":1}an experimental new type to provide built-in JSON support, with better query performance comparing saving the JSON as string and extract value at query time. Suitable for JSON documents in same schema.
Date and Time Typesdate'2022-05-16'without timeto_date, today
datetime'2022-05-16 11:01:02'with secondto_time, now
datetime64'2022-05-16 11:01:02.345'with millisecond, same as datetime64(3)to_time, now64
Compound Typesarray[1,2]access 1st element via array[1]length, array_concat
mapmap_cast('k1','v1','k2','v2')access key1 via map['key1']map_cast
tuple(1,2)access 1st element via tuple.1