Internal site. Jolli authentication required to view.
Skip to Content

Last Updated: 3/19/2026


SQL Data Types

Feldera supports a comprehensive set of SQL data types for building data pipelines. This reference covers all supported types, their syntax, and usage examples.

Numeric Types

Integers

Feldera supports signed and unsigned integers of various sizes:

  • TINYINT β€” 8-bit signed integer (-128 to 127)
  • SMALLINT β€” 16-bit signed integer (-32,768 to 32,767)
  • INTEGER or INT β€” 32-bit signed integer
  • BIGINT β€” 64-bit signed integer

Unsigned variants (not standard SQL):

  • TINYINT UNSIGNED β€” 8-bit unsigned (0 to 255)
  • SMALLINT UNSIGNED β€” 16-bit unsigned
  • INTEGER UNSIGNED β€” 32-bit unsigned
  • BIGINT UNSIGNED β€” 64-bit unsigned
CREATE TABLE numbers ( tiny TINYINT, small SMALLINT, regular INTEGER, big BIGINT, unsigned_val INTEGER UNSIGNED );

Decimal Types

Fixed-precision decimal numbers:

  • DECIMAL(precision, scale) β€” Fixed-point decimal
  • NUMERIC(precision, scale) β€” Alias for DECIMAL
CREATE TABLE financial ( price DECIMAL(10, 2), -- Up to 99,999,999.99 rate DECIMAL(5, 4), -- Up to 9.9999 amount NUMERIC(18, 6) );

Floating-Point Types

Approximate numeric types:

  • REAL or FLOAT β€” 32-bit floating-point (F32)
  • DOUBLE or DOUBLE PRECISION β€” 64-bit floating-point (F64)
CREATE TABLE measurements ( temperature REAL, distance DOUBLE );

String Types

Character Strings

  • CHAR(n) β€” Fixed-length character string
  • VARCHAR(n) β€” Variable-length character string
  • VARCHAR β€” Variable-length string (no explicit limit)
CREATE TABLE users ( code CHAR(5), -- Always 5 characters name VARCHAR(100), -- Up to 100 characters description VARCHAR -- Unlimited length );

Binary Strings

  • BINARY(n) β€” Fixed-length binary data
  • VARBINARY(n) β€” Variable-length binary data
  • VARBINARY β€” Variable-length binary (no explicit limit)
CREATE TABLE files ( hash BINARY(32), -- 32-byte hash data VARBINARY );

Date and Time Types

Date

  • DATE β€” Calendar date (year, month, day)
CREATE TABLE events ( event_date DATE ); INSERT INTO events VALUES (DATE '2024-01-15');

Time

  • TIME β€” Time of day without timezone
  • TIME(precision) β€” Time with fractional seconds precision
CREATE TABLE schedule ( start_time TIME, precise_time TIME(6) -- Microsecond precision );

Timestamp

  • TIMESTAMP β€” Date and time without timezone
  • TIMESTAMP(precision) β€” Timestamp with fractional seconds precision
CREATE TABLE logs ( created_at TIMESTAMP, precise_ts TIMESTAMP(6) ); INSERT INTO logs VALUES (TIMESTAMP '2024-01-15 14:30:00');

Intervals

  • INTERVAL β€” Time duration
SELECT event_time + INTERVAL 1 HOUR as one_hour_later, event_time - INTERVAL 30 DAY as thirty_days_ago FROM events;

Interval units: YEAR, MONTH, DAY, HOUR, MINUTE, SECOND

Boolean Type

  • BOOLEAN β€” True or false value
CREATE TABLE flags ( is_active BOOLEAN, is_deleted BOOLEAN ); INSERT INTO flags VALUES (TRUE, FALSE);

Complex Types

Arrays

Arrays of any supported type:

CREATE TABLE data ( tags ARRAY<VARCHAR>, scores ARRAY<INTEGER>, matrix ARRAY<ARRAY<DOUBLE>> -- Nested arrays ); INSERT INTO data VALUES ( ARRAY['tag1', 'tag2'], ARRAY[1, 2, 3], ARRAY[ARRAY[1.0, 2.0], ARRAY[3.0, 4.0]] );

Array operations:

  • ARRAY[1, 2, 3] β€” Array literal
  • arr[1] β€” Array indexing (1-based)
  • CARDINALITY(arr) β€” Array length

Maps

Key-value mappings:

CREATE TABLE metadata ( properties MAP<VARCHAR, VARCHAR>, counters MAP<VARCHAR, INTEGER> ); INSERT INTO metadata VALUES ( MAP['key1', 'value1', 'key2', 'value2'], MAP['count1', 10, 'count2', 20] );

Map operations:

  • MAP['k1', 'v1', 'k2', 'v2'] β€” Map literal
  • m['key'] β€” Map lookup
  • CARDINALITY(m) β€” Number of entries

Structs (Records)

Composite types with named fields:

CREATE TABLE locations ( point STRUCT<x DOUBLE, y DOUBLE>, address STRUCT< street VARCHAR, city VARCHAR, zip VARCHAR(10) > ); INSERT INTO locations VALUES ( ROW(10.5, 20.3), ROW('123 Main St', 'Springfield', '12345') );

Struct field access:

  • point.x β€” Field access
  • ROW(1, 'a') β€” Struct literal

Special Types

UUID

Universally unique identifiers:

CREATE TABLE entities ( id UUID PRIMARY KEY );

Variant (JSON)

Dynamic JSON-like values:

CREATE TABLE documents ( data VARIANT );

NULL Values

All types can be nullable by default. Use NOT NULL to require a value:

CREATE TABLE users ( id INTEGER NOT NULL, name VARCHAR NOT NULL, email VARCHAR, -- Nullable age INTEGER -- Nullable );

Type Casting

Explicit type conversion:

SELECT CAST('123' AS INTEGER), CAST(123.45 AS VARCHAR), CAST('2024-01-15' AS DATE) FROM events;

Implicit casting occurs in many contexts (e.g., INTEGER to BIGINT).

Default Values

Specify default values for columns:

CREATE TABLE orders ( id INTEGER NOT NULL, status VARCHAR DEFAULT 'pending', created_at TIMESTAMP DEFAULT NOW() );

Type Aliases

Common type aliases:

  • INT = INTEGER
  • FLOAT = REAL
  • DOUBLE PRECISION = DOUBLE
  • NUMERIC = DECIMAL

What’s Next