A named collection of types that defines the column names and types in a RecordBatch or Table data structure.

A Schema can also contain extra user-defined metadata either at the Table or Column level. Column-level metadata is often used to define extension types.

Constructors

Methods

  • Returns void

  • Find the index of the column with the given name.

    Parameters

    • name: string

    Returns number

  • Export this Table to FFI structs according to the Arrow C Data Interface.

    This method does consume the Table, so the original Table will be inaccessible after this call. You must still call FFITable.free after you've finished using the FFITable.

    Returns FFIArrowSchema

  • Consume this schema and convert to an Arrow IPC Stream buffer

    Returns Uint8Array

  • Returns an immutable reference to the Map of custom metadata key-value pairs.

    Returns SchemaMetadata

  • Export this schema to an FFIArrowSchema object, which can be read with arrow-js-ffi.

    This method does not consume the Schema, so you must remember to call Schema.free to release the resources. The underlying arrays are reference counted, so this method does not copy data, it only prevents the data from being released.

    Returns FFIArrowSchema

  • Sets the metadata of this Schema to be metadata and returns a new object

    Parameters

    Returns Schema