We value your privacy

This site uses cookies to improve your browsing experience, analyze site traffic, and show personalized content. See our Privacy Policy.

  1. MooseStack
  2. Data Types
  3. Array Types

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

On this page

Basic ArraysArrays of Complex TypesType Mapping Reference
FiveonefourFiveonefour
Fiveonefour Docs
MooseStackHostingTemplatesGuides
Release Notes
Source531
  • Overview
Build a New App
  • 5 Minute Quickstart
  • Browse Templates
  • Existing ClickHouse
Add to Existing App
  • Next.js
  • Fastify
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Language Server
  • Data Modeling
Moose Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs & Web Apps
Deployment & Lifecycle
  • Moose Dev
  • 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
  • Release Notes
Contribution
  • Documentation
  • Framework
interface User {  tags: string[];           // Array(String)  scores: number[];         // Array(Float64)  ids: Int32[];             // Array(Int32)  flags: boolean[];         // Array(Boolean)}
import { ClickHouseNamedTuple } from "@514labs/moose-lib"; interface Event {  metadata: Record<string, any>[];    // Array(Json)  points: {    x: number;    y: number;  }[];                                 // Array of nested objects}