1. MooseStack
  2. Data Types
  3. Array Types

On this page

Basic ArraysArrays of Complex TypesType Mapping Reference

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 TypeTypeScriptPython
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)).

  • Overview
  • Quick Start
  • Templates / Examples
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Data Modeling
MooseStack in your App
  • App / API frameworks
Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs
Deployment & Lifecycle
  • Moose Migrate
  • Moose Deploy
Reference
  • API Reference
  • Data Types
    • Strings
    • LowCardinality
    • Integers
    • Floats
    • Decimals
    • Booleans
    • Date & Time
    • Network
    • Arrays
    • Maps
    • Nested
    • Tuples
    • Enums
    • Geometry
    • JSON
    • Nullable
    • Aggregates
  • Table Engines
  • CLI
  • Configuration
  • Observability Metrics
  • Help
  • Changelog
Contribution
  • Documentation
  • Framework
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackTemplates
Changelog
Source506