Array Types
Arrays store ordered collections of elements of the same type.
Basic Arrays
interface User { tags: string[]; // Array(String) scores: number[]; // Array(Float64) ids: Int32[]; // Array(Int32) flags: boolean[]; // Array(Boolean)}Arrays of Complex Types
Arrays can contain complex types like JSON or tuples.
import { ClickHouseNamedTuple } from "@514labs/moose-lib"; interface Event { metadata: Record<string, any>[]; // Array(Json) points: { x: number; y: number; }[]; // Array of nested objects}Type Mapping Reference
| ClickHouse Type | TypeScript | Python |
|---|---|---|
Array(String) | string[] | List[str] |
Array(Float64) | number[] | List[float] |
Array(Int32) | Int32[] | List[int] |
Array(Boolean) | boolean[] | List[bool] |
Array(Json) | Record<string, any>[] | List[Dict[str, Any]] |
Nested arrays
You can nest arrays to create multi-dimensional structures: number[][] maps to Array(Array(Float64)).