For the complete documentation index, see llms.txt. This page is also available as Markdown.

Schema

Schemas define the structure of data in your tables. Every source and sink table requires a schema that specifies field definitions. The schema lives inside spec.config.schema in a LaminarTable CRD.

apiVersion: laminar.stream/v1alpha1
kind: LaminarTable
metadata:
  name: my-table
  namespace: e6data
spec:
  clusterRef: e6data
  connector: kafka
  config:
    name: my_table
    # ... connector config ...
    schema:        # <-- schema goes here
      format:
        json: {}
      fields:
        - field_name: user_id
          field_type:
            type:
              primitive: Int64
          nullable: false

For data serialization formats (JSON, Avro, Parquet, Protobuf, raw), framing, and bad data handling, see the Data Formats reference.


Fields

The fields array defines the structure of each record.

Primitive Types

Type
Description
SQL Equivalent

Bool

Boolean

BOOLEAN

Int32

32-bit signed integer

INTEGER

Int64

64-bit signed integer

BIGINT

UInt32

32-bit unsigned integer

-

UInt64

64-bit unsigned integer

-

F32

32-bit floating point

FLOAT

F64

64-bit floating point

DOUBLE

String / Utf8

UTF-8 string

VARCHAR / TEXT

Bytes

Binary data

BYTEA

Json

JSON data

JSON

Date32

Date (days since epoch)

DATE

DateTime

RFC3339 datetime

TIMESTAMP

UnixMillis

Unix timestamp (milliseconds)

TIMESTAMP

UnixMicros

Unix timestamp (microseconds)

TIMESTAMP

UnixNanos

Unix timestamp (nanoseconds)

TIMESTAMP

Field Definition

Each field requires field_name, field_type, and nullable:

Struct (Nested Objects)

Use the struct type for nested objects:

List (Arrays)

Use the list type for arrays:

You can combine list and struct for arrays of objects:


Primary Keys

For CDC source tables, specify primary keys to identify unique rows:


Complete Example

A full LaminarTable with a detailed schema:

Last updated

Was this helpful?