Arrow JS API · type system
Choose a logical type before choosing storage.
Arrow DataType classes describe what a column means: integers, floating point, text, binary, timestamps, lists, structs, maps, unions, and dictionaries. Builders and vectors use that choice to keep values typed.
The Arrow type map
Make values portable by naming their meaning.
A DataType is more than a JavaScript constructor. It determines buffers, null handling, nested children, serialization, and how another Arrow implementation interprets the column.
Scalar
Null, Bool, integers, floats, decimals, and binary/text
Temporal
Date, time, timestamp, duration, and interval types
Nested
List, fixed-size list, struct, map, and union
Encoded
Dictionary and other types with child or index storage
Detailed guide
DataType reference
The sections below list core type families, constructors, properties, predicates, and the relationships between types, fields, and storage.
This page is aligned to Apache Arrow JS v21.x (apache-arrow).
Arrow DataType classes describe logical column types. You compose schemas, builders, and vectors from these types.
Usage
import {Int32, Utf8, Struct, Field, Schema} from 'apache-arrow';
const schema = new Schema([
new Field('id', new Int32(), false),
new Field('name', new Utf8(), true)
]);
import {DataType} from 'apache-arrow';
console.log(DataType.isInt(new Int32()));
Core type families
Null and boolean
NullBool
Integer
IntInt8Int16Int32Int64Uint8Uint16Uint32Uint64
Floating point
FloatFloat16Float32Float64
Binary and text
BinaryLargeBinaryUtf8LargeUtf8FixedSizeBinary
Temporal
Date_DateDayDateMillisecondTimeTimeSecondTimeMillisecondTimeMicrosecondTimeNanosecondTimestampTimestampSecondTimestampMillisecondTimestampMicrosecondTimestampNanosecond
Decimal
Decimal
Nested
ListFixedSizeListStructMap_UnionSparseUnionDenseUnion
Dictionary and intervals
DictionaryDurationDurationSecondDurationMillisecondDurationMicrosecondDurationNanosecondIntervalIntervalDayTimeIntervalYearMonth
Static type checks
DataType exports runtime type guards with typed boolean outcomes:
DataType.isInt(x: unknown): x is IntDataType.isFloat(x: unknown): x is FloatDataType.isUtf8(x: unknown): x is Utf8DataType.isList(x: unknown): x is ListDataType.isStruct(x: unknown): x is StructDataType.isDictionary(x: unknown): x is Dictionary
Migration notes
Older docs and examples frequently use type-specific vector names (for example Int32Vector).
In Apache Arrow JS v21, those are not the primary exported public classes; use:
new Int32()/new Utf8()to describe schema-level typesmakeVector/vectorFromArrayto build vectorsSchema,Field, andTablefor structured data assembly