Skip to content

TableSpec

TableSpec

TableSpec is the model used to create the schema of the table. It is in the format:

{
  "<name of column>": {
    "type": "<type of column>"
  }
}

Supported types

Simple Datatypes:

  • bool: boolean
  • int: 32-bit integer
  • int32: 32-bit integer
  • long: 64-bit integer
  • int64: 64-bit integer
  • double: 64-bit float
  • date: 64-bit date

Possible precisions: ms(millisecond)

  • date64: 64-bit date
  • string: string
  • binary: binary
  • geometry: binary

Geometry can be represented in 3 formats:

Complex Datatypes:

Some types need to have precision value stated in the schema. Precision can be stated by putting the precision value in brackets after the timestamp like this: time<ns> Possible precisions are stated below the necessary types

  • time: 64-bit time

Possible precisions: us(microsecond), ns(nanosecond)

  • time64: 64-bit time

Possible precisions: us(microsecond), ns(nanosecond)

  • timestamp: timestamp

Possible precisions: s(second), ms(millisecond), us(microsecond), ns(nanosecond)

  • list: list

Possible precisions: item: Supported complex type list<item: bool>

  • map: map

Possible precisions: Supported complex type, Supported complex type map<bool, int>

List and map complex datatypes can only contain a subset of the supported simple datatypes. Supported simple datatypes that can be put into the list and map are:

  • bool
  • int
  • int32
  • long
  • int64
  • double
  • string
  • binary